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 Use array's device when promoting scalars #73

Closed betatim closed 1 month ago

betatim commented 1 month ago

When promoting a scalar in the context of an existing array, e.g. x ** 2 we should use the device of x for the array we create.

asmeurer commented 1 month ago

@betatim should I make a release with these changes or are there more incoming?

betatim commented 1 month ago

I don't know, maybe lets wait a bit. I've been finding these via running the scikit-learn tests, so far they don't run to completion. But it needs a bit of digging to figure out what the bug is each time