[NumPy-Tickets] [NumPy] #1904: ndarray derived classes: inconsistent return type of min()
NumPy Trac
numpy-tickets@scipy....
Thu Jul 21 14:53:27 CDT 2011
#1904: ndarray derived classes: inconsistent return type of min()
------------------------+---------------------------------------------------
Reporter: cstraehl | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: numpy.core | Version: 1.6.0
Keywords: |
------------------------+---------------------------------------------------
Comment(by hans.meine):
The example code misses the actual calls to a1.min() and a2.min() in
the assertion:
{{{
import numpy
class Test(numpy.ndarray):
pass
a1 = numpy.ndarray((1,))
a2 = Test((1,))
assert type(a1.min()) == type(a2.min()), \
"%s != %s" % (type(a1.min()), type(a2.min()))
}}}
This code fails with 1.6.0, while it worked in 1.3.0.
I tend to think that this is a bug (after all, a1.min() does not return
ndarray, but an array scalar), but maybe there is also a good reason for
this
(for us, unexpected) behavor change and a nice solution?
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1904#comment:3>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list