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)).
The present work-around is to use 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])
An example where this arises naturally is
It would arise even more naturally with addition of
dpt.unstackwhere it would be as simple asdpt.asarray( dpt.unstack(x)).The present work-around is to use
dpt.stack: