Documentation Index
Fetch the complete documentation index at: https://numpyts.dev/llms.txt
Use this file to discover all available pages before exploring further.
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 | PadWidthArg | — | Number of values padded to each edge. Accepts the full NumPy broadcast forms (see below). |
mode | string | 'constant' | Padding mode. Only 'constant' is currently supported; other modes throw. |
constant_values | PadValueArg | 0 | Fill value(s) when mode is 'constant'. Same broadcast forms as pad_width. |
NDArray — Padded array.
Both pad_width and constant_values accept these broadcast forms:
- scalar
n—[n, n]for every axis [n]— broadcast[n, n]to every axis[before, after]— same pair on every axis[n0, n1, …, n_{ndim-1}]— per-axis scalars (each becomes[n_i, n_i])[[b, a]]— broadcast pair to every axis[[b0, a0], …, [b_{ndim-1}, a_{ndim-1}]]— per-axis pairs- mixed:
[n0, [b1, a1], …]— scalars expand to[n, n]
constant_values varies by axis, corner cells follow NumPy’s “highest-axis-wins” rule: the value from the largest-indexed axis whose pad region covers the cell is used.