[NumPy-Tickets] [NumPy] #1435: numpy.gradient() does not support array subclasses

NumPy Trac numpy-tickets@scipy....
Thu Mar 18 13:07:09 CDT 2010


#1435: numpy.gradient() does not support array subclasses
-----------------------+----------------------------------------------------
 Reporter:  rmay       |       Owner:  somebody
     Type:  defect     |      Status:  new     
 Priority:  normal     |   Milestone:  2.0.0   
Component:  numpy.lib  |     Version:  devel   
 Keywords:  patch      |  
-----------------------+----------------------------------------------------
 For no good reason, numpy.gradient does not support ndarray subclasses,
 like masked arrays.  This is due to the use of numpy.zeros on line 822,
 instead of using something like numpy.zeros_like().

 Changing zeros to zeros_like allows the function to return arrays of the
 proper subclass.

 Also, while the function makes an effort to determine a floating point
 type for the output array (805-807), it was not actually using this type.
 I've corrected this as well.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1435>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list