Folks,
I keep running into the following problem since some recent update (I'm
currently running 1.0b3, but the problem occurred roughly around 0.9.8):
>>> import numpy.core.ma as MA
>>> x=MA.array([[1],[2]],mask=False)
>>> x.sum(None)
/usr/lib64/python2.4/site-packages/numpy/core/ma.py in reduce(self, target,
axis, dtype)
393 m.shape = (1,)
394 if m is nomask:
--> 395 return masked_array (self.f.reduce (t, axis))
396 else:
397 t = masked_array (t, m)
TypeError: an integer is required
#................................
Note that x.sum(0) and x.sum(1) work fine. I know some consensus seems to be
lacking with MA, but still, I can't see why axis=None is not recognized.
Corollary: with masked array, the default axis for sum is 0, when it's None
for regular arrays. Is there a reason for this inconsistency ?
Thanks a lot
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/numpy-discussion