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
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.
As discovered in #7259 and #7260, string- and unicode- numpy scalars do not support indexing with an empty tuple, unlike other scalars:
This may be a problem because indexing with an empty tuple is a way of converting possible 0-d arrays to scalars:
As of writing this it's not 100% clear to me we actually want this. It could be that instead of just writing
we should encourage people to write something like
But, on the other hand it's probably a good idea for all scalar types to behave similarly. I made a rough outline for a fix in a comment in #7260.
The text was updated successfully, but these errors were encountered: