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? # 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
If we look at dpnp and numpy, they support zero-length array creation (i.e. shape is 0)
dpnp
numpy
shape
>>> import numpy as np >>> a = np.empty(0) >>> a array([], dtype=float64) >>> import dpnp >>> a = dpnp.empty(0) >>> a array([])
numba-dpex should do the same.
numba-dpex
@dpjit def foo(): x = dpnp.empty(0) return x a = foo() print(a)
but it doesn't:
Traceback (most recent call last): File "/localdisk/work/$USER/numba-dpex/my-driver.py", line 20, in <module> a = bar() MemoryError: USM allocation failed. Check the usm_type and queue.
This is applicable all other array creation functions, zeros(), ones(), etc.
zeros()
ones()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If we look at
dpnp
andnumpy
, they support zero-length array creation (i.e.shape
is 0)numba-dpex
should do the same.but it doesn't:
This is applicable all other array creation functions,
zeros()
,ones()
, etc.The text was updated successfully, but these errors were encountered: