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
An example where this arises naturally is
x = dpt.arange(3) dpt.asarray([ x[0], x[1], x[2] ])
It would arise even more naturally with addition of dpt.unstack where it would be as simple as dpt.asarray( dpt.unstack(x)).
dpt.unstack
dpt.asarray( dpt.unstack(x))
The present work-around is to use dpt.stack:
dpt.stack
In [13]: x = dpt.arange(5) In [14]: dpt.stack([ x[i] for i in range(x.shape[0])]) Out[14]: usm_ndarray([0, 1, 2, 3, 4])
The text was updated successfully, but these errors were encountered:
First implementation to resolve gh-1134
c070c86
Examples: ``` import dpctl.tensor as dpt m = dpt.ones((2,4), dtype='i4') w = dpt.zeros(4) v = dpt.full(4, -1) ar = dpt.asarray([m, [w, v]]) ar2 = dpt.asarray([m, [w, v]], device='cpu') ```
e30a973
7f0f48a
oleksandr-pavlyk
Successfully merging a pull request may close this issue.
An example where this arises naturally is
It would arise even more naturally with addition of
dpt.unstack
where it would be as simple asdpt.asarray( dpt.unstack(x))
.The present work-around is to use
dpt.stack
:The text was updated successfully, but these errors were encountered: