BUG: nanops.nanmedian doesn't work when axis=None (original) (raw)

The default value for the axis argument for nanops.nanmedia is None. However, the function raises an exception when using this value:

from pandas.core import nanops import bottleneck import numpy as np nanops._USE_BOTTLENECK = False

val = np.random.randn(13, 11, 7)

bottleneck.nanmedian(val, axis=None).ndim 0 nanops.nanmedian(val, axis=None) TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int' nanops.nanmedian(val) TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int'