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
I cannot currently think of a situation where users would need to specify the specific device. If there’s a situation where it would make sense then I am not against adding it, but otherwise it will probably cause more confusion.
Asarray now takes dtype. Currently only bool, signed/unsigned int8-64, float16-64 and complex64-128 are implemented. It is possible to add more but for now it seemed enough. Because of the new dtype enum, which serves to unify the different dtype representations, it is now possible to add dtype args to more methods without having to test every single dtype across all supported frameworks (np.in32, torch.int32, tf.int32 etc…).
Regarding copy as an argument of some functions. This should be considered more thoroughly, some frameworks generally use views/inplace to make it much more efficient but some frameworks like tensorflow are immutable and are therefore always copies. This should in general be documented more thoroughly, users should not rely on (or forget) that the operation may modify the value in place. For the argument itself, I don’t mind adding it but it seems a bit extra in my opinion. From my experience you more often don’t want to copy the array, but I suppose its convenient when you’d want to.
Activity
[-]Adding dtype and device[/-][+]Aligning with Array API[/+]Simpag commentedon May 25, 2026
I cannot currently think of a situation where users would need to specify the specific device. If there’s a situation where it would make sense then I am not against adding it, but otherwise it will probably cause more confusion.
Asarray now takes dtype. Currently only bool, signed/unsigned int8-64, float16-64 and complex64-128 are implemented. It is possible to add more but for now it seemed enough. Because of the new dtype enum, which serves to unify the different dtype representations, it is now possible to add dtype args to more methods without having to test every single dtype across all supported frameworks (np.in32, torch.int32, tf.int32 etc…).
Regarding copy as an argument of some functions. This should be considered more thoroughly, some frameworks generally use views/inplace to make it much more efficient but some frameworks like tensorflow are immutable and are therefore always copies. This should in general be documented more thoroughly, users should not rely on (or forget) that the operation may modify the value in place. For the argument itself, I don’t mind adding it but it seems a bit extra in my opinion. From my experience you more often don’t want to copy the array, but I suppose its convenient when you’d want to.