[Numpy-discussion] 1.1.0rc1 RuntimeErrors
Pierre GM
pgmdevlist at gmail.com
Wed May 21 11:28:29 EDT 2008
All,
Most of the errors that are reported in 1.1.0rc1 are related to the .tolist()
method in numpy.ma, such as :
############################
ERROR: Tests fields retrieval
----------------------------------------------------------------------
Traceback (most recent call last):
File
"C:\Apps\Python\Lib\site-packages\numpy\ma\tests\test_mrecords.py", line
62, in test_get
assert_equal(getattr(mbase,field), mbase[field])
File "C:\Apps\Python\Lib\site-packages\numpy\ma\testutils.py", line
104, in assert_equal
desired.tolist(),
File "C:\Apps\Python\Lib\site-packages\numpy\ma\core.py", line 2552,
in tolist
result = self.filled().tolist()
RuntimeError: array_item not returning smaller-dimensional array
#####################################
Note that the method seems to work, still: for example, the following command
gives the proper output, without RuntimeError
python -c "import numpy as np, numpy.ma as ma; x=ma.array(np.random.rand(5),
mask=[1,0,0,0,0]); print x.tolist()"
The problem looks quite recent, and not related to numpy.ma itself: what
changed recently in the .tolist() method of ndarrays ? Why do we get these
RuntimeErrors ?
More information about the NumPy-Discussion
mailing list