Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BUG: full_like accepts array fill_value #55

Open
lucascolley opened this issue Aug 8, 2024 · 3 comments
Open

BUG: full_like accepts array fill_value #55

lucascolley opened this issue Aug 8, 2024 · 3 comments

Comments

@lucascolley
Copy link
Contributor

lucascolley commented Aug 8, 2024

In [1]: import array_api_strict as xp

In [2]: xp.full_like(xp.asarray(0), xp.asarray(1))
Out[2]: Array(1, dtype=array_api_strict.int64)

Spec:

fill_value (Union[bool, int, float, complex]) – fill value.
@asmeurer
Copy link
Member

asmeurer commented Aug 8, 2024

This seems like it should be fixed in the standard. Getting a fill value from an array seems like it wouldn't be uncommon.

@kgryte
Copy link

kgryte commented Aug 8, 2024

Torch only accepts a scalar in full and full_like. To update the standard, I'd want to see upstream support added first.

@lucascolley
Copy link
Contributor Author

Dask also throws a FutureWarning since its implementation uses np.copyto, which it says may stop working with dask arrays in the future.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants