forked from stdlib-js/stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepl.txt
More file actions
35 lines (26 loc) · 955 Bytes
/
repl.txt
File metadata and controls
35 lines (26 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{{alias}}( x, reps )
Returns an ndarray created by repeating the elements of an input ndarray
a specified number of times along each dimension.
The number of repetitions must have at least as many elements as the number
of input dimensions. When the number of repetitions exceeds the number of
input dimensions, the input array is treated as if singleton dimensions
were prepended.
The function always copies data to a new ndarray.
Parameters
----------
x: ndarray
Input array.
reps: ArrayLikeObject
Number of repetitions along each dimension.
Returns
-------
out: ndarray
Output array.
Examples
--------
> var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] )
<ndarray>[ [ 1, 2 ], [ 3, 4 ] ]
> var o = {{alias}}( x, [ 2, 2 ] )
<ndarray>[ [ 1, 2, 1, 2 ], [ 3, 4, 3, 4 ], [ 1, 2, 1, 2 ], [ 3, 4, 3, 4 ] ]
See Also
--------