[Numpy-discussion] Numpy 1.4 MaskedArray bug?
Charles سمير Doutriaux
doutriaux1 at llnl.gov
Tue Jan 19 13:32:33 EST 2010
We didn't move to 1.4 yet.
Should we wait for 1.4.1? It seems there's some issues with numpy.ma
in 1.4 and we rely heavily on it.
On Jan 12, 2010, at 11:50 AM, Pierre GM wrote:
> On Jan 12, 2010, at 1:52 PM, Charles R Harris wrote:
>> On Tue, Jan 12, 2010 at 11:32 AM, Pauli Virtanen <pav at iki.fi> wrote:
>> ti, 2010-01-12 kello 12:51 -0500, Pierre GM kirjoitti:
>>>>>>> a = numpy.ma.MaskedArray([[1,2,3],[4,5,6]])
>>>>>>> numpy.ma.sum(a, 1)
>>>> Traceback (most recent call last):
>>>> File "<stdin>", line 1, in <module>
>>>> umpy/ma/core.py", line 5682, in __call__
>>>> return method(*args, **params)
>>>> umpy/ma/core.py", line 4357, in sum
>>>> newmask = _mask.all(axis=axis)
>>>> ValueError: axis(=1) out of bounds
>>> Before I take full blame for it, can you try the following on both
>>> 1.3 and 1.4 ?
>> Oh crap, it's mostly my fault:
>> Pretty embarassing, as very simple things break, although the test
>> miraculously passes...
>>> Back to your problem: I'll fix that ASAIC, but it'll be on the
>>> SVN. Meanwhile, you can:
>>> * Use -1 instead of 1 for your axis.
>>> * Force the definition of a mask when you define your array with
>> Sounds like we need a 1.4.1 out at some point not too far in the
>> If so, then it should be sooner rather than later in order to sync
>> with the releases of ubuntu and fedora. Both of the upcoming
>> releases still use 1.3.0, but that could change...
> I guess that the easiest would be for me to provide a workaround for
> the bug (Pauli's modifications make sense, I was relying on a
> *feature* that wasn't very robust).
> I'll update both the trunk and the 1.4.x branch
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
More information about the NumPy-Discussion