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
>>> m = np.ma.array(["hello"])
>>> np.ma.take(m, 0)
File "\numpy\ma\core.py", line 5670, in take
out = _data.take(indices, axis=axis, mode=mode)[...].view(cls)
TypeError: string indices must be integers
np.string_ scalars cannot be indexed with [...], and np.object_ scalars do
not even exist.
The only way to make this work is to not allow a scalar to be produced in the first place - which can be achieved by adding an extra dimension to the indices, and removing it while allowing 0d arrays
Fixesnumpy#9206
Uh oh!
There was an error while loading. Please reload this page.
Since
np.string_[...]
is not supportedIntroduced by #7586
The text was updated successfully, but these errors were encountered: