Closed
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
numpy/numpy#15555 reports an issue with np.argwhere
on pandas Series. Reporting here for visibility.
MRE:
>>> import numpy as np
>>> import pandas as pd
>>> s = pd.Series(np.random.randn(5), index=['a', 'b', 'c', 'd', 'e'])
>>> np.argwhere(s < 0)
which, with numpy.__version__ ==1.20.0.dev0+046a736
gives:
pd.version == 0.25.3:
FutureWarning: Series.nonzero() is deprecated and will be removed in a future version.Use Series.to_numpy().nonzero() instead
array([[3]])
pd.version == 1.0.5:
ValueError: Length of passed values is 1, index implies 5.