Skip to content

BUG: several nanops fail when axis==0 for 1-dimensional nan arrays #7354

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
toddrjen opened this issue Jun 5, 2014 · 1 comment
Closed
Labels
Bug Internals Related to non-user accessible pandas implementation Numeric Operations Arithmetic, Comparison, and Logical operations Testing pandas testing functions or related to the test suite
Milestone

Comments

@toddrjen
Copy link
Contributor

toddrjen commented Jun 5, 2014

Several of the functions in nanops, including nanmean, nanmedian, and anything using _get_counts will crash when using a 1-dimensional all-nan array when the axis argument is set to 0.

>>> from pandas.core import nanops
>>> import bottleneck
>>> import numpy as np
>>> nanops._USE_BOTTLENECK = False
>>> 
>>> val = np.tile(np.nan, (5,))
>>> 
>>> bottleneck.nanmean(val, axis=0)
nan
>>> nanops.nanmean(val, axis=0)
TypeError: 'numpy.float64' object does not support item assignment
@jreback
Copy link
Contributor

jreback commented Jun 12, 2014

closed by #7354

@jreback jreback closed this as completed Jun 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Internals Related to non-user accessible pandas implementation Numeric Operations Arithmetic, Comparison, and Logical operations Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

2 participants