tile
Construct an array by tilinga according to the repetition counts in reps. The result has the same dtype as a.
| Name | Type | Default | Description |
|---|---|---|---|
a | ArrayLike | — | Input array. |
reps | number | number[] | — | Number of repetitions along each axis. A single integer repeats along all axes equally. An array specifies repetitions per axis (padded with 1s on the left when shorter than a.ndim). |
NDArray — The tiled array.
repeat
Repeat each element of an array a given number of times.| Name | Type | Default | Description |
|---|---|---|---|
a | ArrayLike | — | Input array. |
repeats | number | number[] | — | Number of repetitions for each element. If a single integer, all elements are repeated equally. If an array, its length must match the size of a (when axis is undefined) or the length of the specified axis. |
axis | number | undefined | Axis along which to repeat. If undefined, the array is flattened first and the result is 1-D. |
NDArray — Array with repeated elements.
pad
Pad an array with values along each dimension.| Name | Type | Default | Description |
|---|---|---|---|
arr | ArrayLike | — | Input array. |
pad_width | number | [number, number] | [number, number][] | — | Number of values padded to each edge. A single integer pads all axes equally on both sides. A [before, after] tuple applies the same padding to every axis. An array of tuples specifies [before, after] per axis. |
mode | string | 'constant' | Padding mode. Currently supports 'constant'. |
constant_values | number | 0 | Fill value when mode is 'constant'. |
NDArray — Padded array.