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 <[email protected]> wrote: > On Sun, Feb 16, 2014 at 12:13 PM, David Freese <[email protected]> > 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 > [email protected] > http://mail.scipy.org/mailman/listinfo/numpy-discussion >
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
