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

Attachment: fix_gradient_with_subclasses.diff
Description: Binary data

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to