It seems that ma.array does not accept a sequence which contains a
masked scalar array (not sure if this is the correct term). Is this
deliberate?

#numpy 1.0b5, python 2.3.x, winXP
import numpy as N
print N.ma.array([1,2,3, N.ma.array(1, mask=True)])

Traceback (most recent call last):
  File "C:\eclipse\plugins\org.python.pydev.debug_1.2.2\pysrc\pydevd_comm.py",
line 529, in doIt
    result = pydevd_vars.evaluateExpression( self.thread_id,
self.frame_id, self.expression, self.doExec )
  File "C:\eclipse\plugins\org.python.pydev.debug_1.2.2\pysrc\pydevd_vars.py",
line 258, in evaluateExpression
    exec expression in frame.f_globals, frame.f_locals
  File "<string>", line 1, in ?
  File "C:\Python23\Lib\site-packages\numpy\core\ma.py", line 562, in __init__
    c = numeric.array(data, dtype=tc, copy=True, order=order)
TypeError: an integer is required

#works fine if scalar masked array is not masked
print N.ma.array([1,2,3, N.ma.array(1)])

[1 2 3 1]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to