ptypy.utils.array_utils.pad_lr#
- ptypy.utils.array_utils.pad_lr(A, axis, l, r, fillpar=0.0, filltype='scalar')#
Pads ndarray A orthogonal to axis with l layers (pixels,lines,planes,…) on low side an r layers on high side.
- Parameters:
A (array-like) – Input array
axis (int) – Pads orthogonal to axis on with l layers (pixels,lines, planes,…) on low side an r layers on high side.
l (int) – Pads orthogonal to axis on with l layers (pixels,lines, planes,…) on low side an r layers on high side.
r (int) – Pads orthogonal to axis on with l layers (pixels,lines, planes,…) on low side an r layers on high side.
fillpar (scalar) – Scalar fill parameter for
filltype=scalarfill.filltype (str) –
‘scalar’, uniformly pad with fillpar
’mirror’, mirror A
’periodic’, periodic fill
’custom’, pad according arrays found in fillpar
- Returns:
Padded array
- Return type:
ndarray
See also