[Numpy-discussion] Is this a bug in numpy.ma.reduce?
Bruce Southey
bsouthey at gmail.com
Mon Mar 8 09:52:38 EST 2010
On 03/08/2010 01:30 AM, David Goldsmith wrote:
> On Sun, Mar 7, 2010 at 4:41 AM, Friedrich Romstedt
> <friedrichromstedt at gmail.com <mailto:friedrichromstedt at gmail.com>> wrote:
>
> 2010/3/5 Pierre GM <pgmdevlist at gmail.com
> <mailto:pgmdevlist at gmail.com>>:
> > 'm'fraid no. I gonna have to investigate that. Please open a
> ticket with a self-contained example that reproduces the issue.
> > Thx in advance...
> > P.
>
> I would like to stress the fact that imo this is maybe not ticket
> and not a bug.
>
> The issue arises when calling a.max() or similar of empty arrays
> a, i.e., with:
>
> >>> 0 in a.shape
> True
>
> Opposed to the .prod() of an empty array, such a .max() or .min()
> cannot be defined, because the set is empty. So it's fully correct to
> let such calls fail. Just the failure is a bit deep in numpy, and
> only the traceback gives some hint what went wrong.
>
> I posted something similar also on the matplotlib-users list, sorry
> for cross-posting thus.
>
>
> Any suggestions, then, how to go about figuring out what's happening
> in my code that's causing this "feature" to manifest itself?
>
> DG
>
>
Perhaps providing the code with specific versions of Python, numpy etc.
would help.
I would guess that aquarius_test.py has not correctly setup the
necessary inputs (or has invalid inputs) required by matplotlib (which I
have no knowledge about). Really you have to find if the _A in cmp.py
used by 'self.norm.autoscale_None(self._A)' is valid. You may be missing
a valid initialization step because the TypeError exception in
autoscale_None ('You must first set_array for mappable') implies
something need to be done first.
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100308/7dc77213/attachment.html>
More information about the NumPy-Discussion
mailing list