5 Jan
2006
5 Jan
'06
8:51 p.m.
the following session demonstrates the difference between numpy.ma and old MA behavior. Sum ndarray and ma.array is ndarray
type(numeric.array([1])+ma.array([1])) <type 'numpy.ndarray'>
However, taken in the different order,
type(ma.array([1])+numeric.array([1])) <class 'numpy.core.ma.MaskedArray'>
In the old MA module the sum is MaskedArray in any order:
type(MA.array([1])+Numeric.array([1])) <class 'MA.MaskedArray'>
type(Numeric.array([1])+MA.array([1])) <class 'MA.MaskedArray'>
I suspected that new ma module may not have __radd__ defined, but it does. Can anyone explain this? Thanks. -- sasha PS:
import numpy numpy.__version__ '0.9.3.1831'