This is an unforeseen side-effect of making the behaviour of dmarray more like numpy.array. The original problem was that ufuncs like max, min, etc. behave inconsistently between numpy arrays and subclasses of arrays (fix committed in [d4d970]).

The original problem can be illustrated using the RealisticInfoArray subclass from http://docs.scipy.org/doc/numpy/user/basics.subclassing.html

RealisticInfoArray([3,4]).min()

RealisticInfoArray(3) #output is a scalar (zero-dim) array

np.array([3,4]).min()

3 #output is a python scalar

The fix implemented there appears to be responsible for the breakage of numpy's conversion to masked_[subclass], where the masked array actually requires the output of the ufunc to remain as an array-type. I've not found where I can detect the fact that it's using a mask and add special case code for that (yet).

I'll keep looking for how to fix this, while retaining the fix to min/max/mean/etc.

The original problem should probably be elevated to numpy though, as it all arises through the fact that subclasses behave differently.