Open shssf opened 4 years ago
Just noticed that numpy repeat
and dpnp repeat
are slightly different, as dpnp doesn't allow repeating a non-array.
eg
import dpnp as dnp
dnp.repeat(0.05, 3) # error 'float' object has no attribute 'ndim'
import numpy as np
np.repeat(0.05, 3) # ok
Just leaving this here in case someone else is confused by the same thing.
@stisa, thank you for noticing that.
As per documentation dpnp.repeat
supports input array x
of either dpnp.ndarray
or usm_ndarray
type.
We will prepare a PR to raise an explicit TypeError
exception in case when x
passed with unsupported type to make the issue more clear.
Need to implement following functions as described here Array manipulation routines
Basic operations
Changing array shape
Transpose-like operations
Changing number of dimensions
Changing kind of array
Joining arrays
Splitting arrays
Tiling arrays
Adding and removing elements
Rearranging elements