Skip to content

Commit 160dac5

Browse files
Added repeat.__docstring__
1 parent 7f977d6 commit 160dac5

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

dpctl/tensor/_manipulation_functions.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,31 @@ def swapaxes(X, axis1, axis2):
932932

933933

934934
def repeat(x, repeats, axis=None):
935+
"""repeat(x, repeats, axis=None)
936+
937+
Repeat elements of an array.
938+
939+
Args:
940+
x (usm_ndarray): input array
941+
942+
repeat (Union[int, Tuple[int, ...]]):
943+
The number of repetitions for each element.
944+
`repeats` is broadcasted to fit the shape of the given axis.
945+
946+
axis (Optional[int]):
947+
The axis along which to repeat values. The `axis` is required
948+
if input array has more than one dimension.
949+
950+
Returns:
951+
usm_narray:
952+
Array with repeated elements.
953+
The returned array must has the same data type as `x`,
954+
is created on the same device as `x` and has the same USM
955+
allocation type as `x`.
956+
957+
Raises:
958+
AxisError: if `axis` value is invalid.
959+
"""
935960
if not isinstance(x, dpt.usm_ndarray):
936961
raise TypeError(f"Expected usm_ndarray type, got {type(x)}.")
937962

0 commit comments

Comments
 (0)