tile
Construct an array by tilinga according to the repetition counts in reps. The result has the same dtype as a.
Returns:
NDArray — The tiled array.
repeat
Repeat each element of an array a given number of times.
Returns:
NDArray — Array with repeated elements.
pad
Pad an array with values along each dimension.
Returns:
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.