[Numpy-discussion] masked arrays and record arrays
Wed Jun 13 14:14:23 CDT 2007
I have made changes in matplotlib svn to facilitate experimentation with
the maskedarray module; I hope this will speed up the process of testing
it and incorporating it into numpy as a replacement for numpy.core.ma.
mpl scripts now accept the switches --maskedarray and --ma to force the
use of the corresponding modules when loaded via matplotlib.numerix.ma
or matplotlib.numerix.npyma. The latter is a new module intended for
internal use in matplotlib as we switch to exclusive use of numpy. It
is needed so that people using numerix in their own code can still get
whatever numeric package and associated masked array package they want,
while internally we can use numpy and either numpy.ma or maskedarray.
There is also a new rcParams['maskedarray'] boolean entry (default is
False) for selection of the masked array module. It is commented out of
matplotlibrc by default, and most mpl users can ignore it.
For switching to numpy inside of mpl, the ma import statement is:
import matplotlib.numerix.npyma as ma
I have not yet actually made this change anywhere; it needs to be made
module-by-module as part of the switch to importing numpy directly
instead of via numerix.
The npyma module and/or the import statement will need to change as
maskedarray is moved from being a standalone package to a part of numpy,
but this change should be quite easy and painless.
Pierre GM wrote:
> On Tuesday 12 June 2007 12:56:39 John Hunter wrote:
>> On 6/12/07, Robert Kern <firstname.lastname@example.org> wrote:
>>> John Hunter wrote:
>>>> Do record arrays support masks?
> Have you tried mrecords, in the alternative maskedarray package available on
> the scipy SVN ? It should support masked fields (by opposition to masked
> records in numpy.core.ma). If not, would you mind giving a test and letting
> me know your suggestions ?
> Thanks a lot in advance for any inputs.
> Numpy-discussion mailing list
More information about the Numpy-discussion