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
In many array libraries today, one can use None when indexing to add a singleton dimension like np.newaxis. Would be good to support in the standard as well.
The text was updated successfully, but these errors were encountered:
Thanks @jakirkham. I think this one fell through the cracks so far. x[:, None, :] is equivalent to expand_dims(x, axis=1), the latter is in the standard so at least there's an easy alternative.
I just tested and it looks like every library supports indexing with None with consistent behavior. So we should just add this I think.
In many array libraries today, one can use
None
when indexing to add a singleton dimension likenp.newaxis
. Would be good to support in the standard as well.The text was updated successfully, but these errors were encountered: