[Numpy-discussion] Requesting Code Review of nanmedian ENH

David Freese dfreese at stanford.edu
Sun Feb 16 13:01:24 EST 2014


the 0s put into the array copy "arr" are not used in computation.  The
_replace_nan call is used primarily to generate a mask of the NaNs and make
sure it passes the mutation test.  I updated the unit tests to reflect
negative values, which works.  (and the documentation should be cleaned up
now)

https://github.com/dfreese/numpy/compare/master...feature;nanmedian



On Sun, Feb 16, 2014 at 9:52 AM, alex <argriffi at ncsu.edu> wrote:

> On Sun, Feb 16, 2014 at 12:13 PM, David Freese <dfreese at stanford.edu>
> wrote:
> > Hi everyone,
> >
> > I put together a np.nanmedian function to extend np.median to handle
> nans.
> > Could someone review this code and give me some feedback on it before I
> > submit a pull request for it?
>
> It looks good to submit as a pull request but probably will need some
> changes like the mixed sign thing already mentioned, and I see mean
> vs. median copypaste remnants in the docstring.
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140216/f797cdd4/attachment.html>


More information about the NumPy-Discussion mailing list