numpy.gradient() does not return ndarray subclasses
18 Mar
2010
18 Mar
'10
2:15 p.m.
Hi, Can I get someone to look at: http://projects.scipy.org/numpy/ticket/1435 Basically, numpy.gradient() uses numpy.zeros() to create an output array. This breaks the use of any ndarray subclasses, like masked arrays, since the function will only return ndarrays. I've attached a patch that fixes that problem and has a simple test checking output types. With this patch, I can use gradient on masked arrays and get appropriately masked output. If we could, it'd be nice to get this in for 2.0 so that I (and my coworkers who found the bug) don't have to use a custom patched gradient until the next release after that. Thanks, Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma
5314
Age (days ago)
5314
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ryan May