data-apis / array-api-strict

Strict implementation of the Python array API (previously numpy.array_api)
http://data-apis.org/array-api-strict/
Other
11 stars 5 forks source link

FIX Propagate input array's device in `asarray` #72

Closed betatim closed 1 month ago

betatim commented 1 month ago

This fixes the problem reported in #70 (but doesn't close because the issue is more generic).

Simple case of forgetting to propagate the device of the input (if it is an array). I've added a test for this and fixedfull_like and empty_like where this was missing.