- Notifications
You must be signed in to change notification settings - Fork54
Closed as not planned
Description
Hi!
During yesterday's NumPy Triage Call we had a discussion aboutcopy keyword for theasarray function, namelyNone/False/True choice for possible values.
The conclusion was thatasarray(x, copy=None) doesn't convey the message of "make a copy only if needed", and could be replaced with something more expressive.
We came up with other possibilities, like string values:
- Always copy:
asarray(x, copy="always") - Copy if needed:
asarray(x, copy="ifneeded") - Never copy:
asarray(x, copy="never")
My question is: Would it make sense to move from None/bool values forcopy keyword to string values in the Array API?
Each library can then use and interpret None/bool as they wish, and only adhere to Array API with new string values that can be passed for library agnostic code.