[Numpy-discussion] 1.8.0, nan functions, and pandas

Charles R Harris charlesr.harris at gmail.com
Wed Oct 2 19:29:28 EDT 2013

Hi All,

There was a problem with pandas 0.12 and the numpy nan functions when
applying the nansum function to a pandas Series object. We thought we had
fixed it by the slight of hand use of `a.sum` instead of `add.reduce(a)` so
that the Series object could use its own version of `sum` which overrides
the ndarray version. However, the pandas sum method has a different
signature, so success was illusory and due to not naming the keyword
arguments in the call. The new nan functions nanmean, nanvar, and nanstd
also failed, as the actually do name the keyword arguments. For pandas
development all the functions work as the pandas sum method now include a
`**kwargs` which gobbles up the missing keyword `keepdims`.

At this point I don't think there is anything we can legitimately do to fix
the pandas 0.12 problem. I propose to name all the keyword arguments
arguments so that pandas fails, as it should, and simply document that the
nan functions will not work with pandas versions < 0.13.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131002/0a24599b/attachment.html>

More information about the NumPy-Discussion mailing list