Skip to content

MAINT: use numpy.nanvar (requires numpy >= 1.8) #10689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jvkersch opened this issue Jul 28, 2015 · 2 comments
Closed

MAINT: use numpy.nanvar (requires numpy >= 1.8) #10689

jvkersch opened this issue Jul 28, 2015 · 2 comments
Labels
Compat pandas objects compatability with Numpy or Python functions Numeric Operations Arithmetic, Comparison, and Logical operations

Comments

@jvkersch
Copy link

This came up in #10679.

Numpy 1.8 implements numpy.nanvar, which can replace pandas.core.nanops._nanvar when the minimum requirement for Numpy is bumped to 1.8 . The implementation of _nanvar in #10679 is in fact based on the corresponding implementation in Numpy.

I haven't checked whether other nanops can be replaced by a suitable Numpy equivalent.

@jreback
Copy link
Contributor

jreback commented Jul 28, 2015

@jvkersch I commented on the other issue. I think should simply do this now with a conditional on the version of numpy. just use not _np_version_under1p8.

alternatively

f = getattr(np,'nanvar',None)

and replace it with the current function

@jreback jreback closed this as completed Jul 28, 2015
@jreback jreback added Numeric Operations Arithmetic, Comparison, and Logical operations Compat pandas objects compatability with Numpy or Python functions labels Jul 28, 2015
@jvkersch
Copy link
Author

Will do, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

No branches or pull requests

2 participants