[NumPy-Tickets] [NumPy] #1438: numpy.trapz() doesn't respect subclass
NumPy Trac
numpy-tickets@scipy....
Sun Mar 21 23:43:23 CDT 2010
#1438: numpy.trapz() doesn't respect subclass
--------------------+-------------------------------------------------------
Reporter: rmay | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 2.0.0
Component: Other | Version: devel
Keywords: patch |
--------------------+-------------------------------------------------------
numpy.trapz uses asarray() inside the code, which converts arrays that
were ndarray subclasses. Otherwise, the code can work fine with
subclasses.
I've attached a patch that fixes this. No test case, because for some
reason I can't get masked arrays to fail without my fix. However, this
does fix the problem for the python-quantities package.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1438>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list