You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
can't index string- and unicode- numpy-scalars with an empty tuple #7267
Arguably not a bug - we're never going to have this work on object scalars, so having it fail on string scalars too forces the library writer to use a solution that works for object scalars too.
Activity
eric-wieser commentedon Mar 6, 2017
Related:
numpy.string_("ABC")[...]fails in the same waycharris commentedon Mar 6, 2017
OTOH,
eric-wieser commentedon Mar 6, 2017
This manifests itself in
np.ma.array(['ab', 'cd']).take(1)due to the patch in #7586eric-wieser commentedon Jul 3, 2017
Arguably not a bug - we're never going to have this work on object scalars, so having it fail on string scalars too forces the library writer to use a solution that works for object scalars too.
InessaPawson commentedon Sep 18, 2026
Closing this older issue in favor of #31435 for the discussion and implementation to stay in one place.