-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
BugInternalsRelated to non-user accessible pandas implementationRelated to non-user accessible pandas implementationNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite
Milestone
Description
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 assignmentMetadata
Metadata
Assignees
Labels
BugInternalsRelated to non-user accessible pandas implementationRelated to non-user accessible pandas implementationNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operationsTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite