[Numpy-discussion] missing function in numpy.ma?
Wed Mar 26 15:16:11 CDT 2008
The reorder is a function we implement. By digging a bit into this my
guess is that all the missing function in numpy.ma are causing to fail
at some point in our init and returning the wrong object type.
But the whole idea was to keep a backward compatible layer with Numeric
and MA. It worked great for a while and now things are getting more and
Correct me if I'm wrong but it seems as if the numpy.oldnumeric.am is
now simply numpy.ma and it's pointing to the new MaskedArray interface.
Loosing a LOT of backward compatibility at the same time.
I'm thinking that such changes should definitely not happen from 1.0.4
to 1.0.5 but rather in some major upgrade of numpy (1.1 at least, may be
It is absolutely necessary to have the oldnumeric.ma working as much as
possible as MA, what's in now is incompatible with code that have been
successfully upgraded to numpy using your recommended method (official
Can you put back ALL the function from numpy.oldnumeric.ma ? It
shouldn't be too much work.
Now I'm actually worried about using ma at all? What version is in? Is
it a completely new package or is it still the old one just a bit
broken? If it's a new one, we'd have to be sure it is fully tested
before we can redistribute it to other people via our package, or before
we use it ourselves
Can somebody bring some light on this issue? thanks a lot,
Pierre GM wrote:
>> result = result.reorder(order).regrid(grid)
>> AttributeError: 'MaskedArray' object has no attribute 'reorder'
>> Should I inherit from soemtihng else ?
> Mmh, .reorder is not a regular ndarray method, so that won't work. What is it
> supposed to do ? And regrid ?
>> Aslo I used to import a some function from numpy.oldnumeric.ma, that are
>> now missing can you point me to their new ma equivalent?
>> common_fill_value, identity, indices and set_fill_value
> For set_fill_value, just use
> m.fill_value = your_fill_value
> For identity, just use the regular numpy version, and view it as a
> For common_fill_value: ah, tricky one, I'll have to check.
> If needed, I'll bring identity into numpy.ma. Please don't hesitate to send
> more feedback, it's always needed.
> Numpy-discussion mailing list
More information about the Numpy-discussion