[Numpy-discussion] 1.1.0rc1 RuntimeErrors

Charles R Harris charlesr.harris@gmail....
Wed May 21 10:35:12 CDT 2008


On Wed, May 21, 2008 at 9:28 AM, Pierre GM <pgmdevlist@gmail.com> wrote:

> 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 ?
>
>
I expect it comes from the matrix churn.  The tolist method was one of those
with a  workaround for the failure to reduce dimensions. I'll look at it
later if someone doesn't beat me to it.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080521/bbc36b2c/attachment.html 


More information about the Numpy-discussion mailing list