Input data types and pure numpy.ma

Hi,

when matplotlib processes variables, it makes sure to handle masked
variables (numpy.ma) by converting them using "soft "
numpy.ma.asarray. So, when a subclass instance of numpy.ma is used as
a variable, it keeps properties and methods in this operation that can
be conflicting with future processing.

An example of problematic input variable can be cdms variable (from
CDAT - cdat.sourceforge.net/). Such a variable is like a numpy.ma with
axes (like time, longitude, latitude, etc) and attributes (like
missing value, name, units). A problem for example is that it cannot
handle "newaxis" slicings (var[:,newaxis]) that matplotlib uses to be
sure that a variable has a suitable rank. In addition, other
properties of cdms variable ares not interesting for matplotlib
processing.

Therefore, it may be useful to strictly convert input variables to
pure numpy.ma using something like numpy.ma.array(var,copy=0).
Is it feasible?

ยทยทยท

--
Stephane Raynaud