function o=sum(A,DIM), 
	if nargin<2, o=map(@sum,A);
	else o=map(@(x)sum(x,DIM),A);
	end
end

