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
On the C-api side there is a function, something like PyArray_ReturnArray or so, which does this conversion. The indexing is just a hack that comes close to doing the same thing really.
InessaPawson
changed the title
Add a helper function to convert to array or scalar
ENH: Add a helper function to convert to array or scalar
Jan 16, 2023
@eric-wieser I’m going to close this issue as the proposed feature didn’t get support from the NumPy dev team at 2023-02-08 meeting where it was reviewed.
Something so that:
Can be implemented trivially as
What should this be called?
asanyarray(x, ..., allow_scalar=True)
asanyarrayorscalar(x)
The text was updated successfully, but these errors were encountered: