[Numpy-discussion] numpy.array.ma class init

Charles Doutriaux doutriaux1@llnl....
Thu Mar 13 09:57:22 CDT 2008


Hello,

we used to have this working, the latest numpy breaks it.
  File 
"/lgm/cdat/5.0.0.alpha7/lib/python2.5/site-packages/cdms2/tvariable.py", 
line 21, in <module>
import numpy.oldnumeric.ma as MA
class TransientVariable(AbstractVariable, MA.array):
TypeError: Error when calling the metaclass bases
    function() argument 1 must be code, not str
 >>> numpy.oldnumeric.ma
<function array at 0xb7a8f48c>

Any suggestion on how to fix that?

Thx,

C


Charles Doutriaux wrote:
> Hi Stephan,
>
> Does the converter from Numeric fixes that? I mean runnning it on an old 
> Numeric script will import numpy.ma, does it still replace with 
> numpy.oldnumeric.ma?
>
> Thx,
>
> C.
>
> Stéfan van der Walt wrote:
>   
>> On Wed, Mar 12, 2008 at 11:39 AM, Charles Doutriaux <doutriaux1@llnl.gov> wrote:
>>   
>>     
>>> My mistake i was still in trunk....
>>>
>>>  but i do get:
>>>
>>>     import numpy, numpy.oldnumeric.ma as MA, numpy.oldnumeric as
>>>  Numeric, PropertiedClasses
>>>   File
>>>  "/lgm/cdat/latest/lib/python2.5/site-packages/numpy/oldnumeric/ma.py",
>>>  line 4, in <module>
>>>     from numpy.core.ma import *
>>>  ImportError: No module named ma
>>>
>>>  How does one build ma these days?
>>>     
>>>       
>> Travis fixed this in latest SVN.  Maskedarrays should now be imported
>> as numpy.ma.
>>
>> Regards
>> Stéfan
>> _______________________________________________
>> Numpy-discussion mailing list
>> Numpy-discussion@scipy.org
>> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>>
>>   
>>     
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>   


More information about the Numpy-discussion mailing list