We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import array_api_compat import torch x = torch.asarray([1.0, 2.0, 3.0]) xp = array_api_compat.get_namespace(x) xp.zeros(shape=(8, 4)) # TypeError: zeros() missing 1 required positional arguments: "size"
The text was updated successfully, but these errors were encountered:
Indeed, shape isn't positional-only so that will need some mapping from shape to size.
shape
size
Sorry, something went wrong.
This is something I would have expected the test suite to catch. @honno
Either way, the fix here is easy. We just need to add a wrapper for zeros using the spec signature.
zeros
19dc410
No branches or pull requests
The text was updated successfully, but these errors were encountered: