The reason why Gagandeep started working on this is so we can have the never-copy behavior in the `numpy.array_api` namespace. For the `asarray` function there, the `copy` keyword is still boolean, with description:
Whether or not to make a copy of the input. If True
, always copies.
If False
, never copies for input which supports DLPack or the buffer protocol,
and raises ValueError
in case that would be necessary.
If None
, reuses existing memory buffer if possible, copies otherwise.
Default: None
.
In the end I think that's better than strings, and way better than enums - we just can't have that in the main namespace, because we can't change what `False` does.