You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / lib / _arraypad_impl / _set_reflect_both

function

numpy.lib._arraypad_impl:_set_reflect_both

source: /numpy/lib/_arraypad_impl.py :297

Signature

def   _set_reflect_both ( padded axis width_pair method original_period include_edge = False )

Summary

Pad axis of arr with reflection.

Parameters

padded : ndarray

Input array of arbitrary shape.

axis : int

Axis along which to pad arr.

width_pair : (int, int)

Pair of widths that mark the pad area on both sides in the given dimension.

method : str

Controls method of reflection; options are 'even' or 'odd'.

original_period : int

Original length of data on axis of arr.

include_edge : bool

If true, edge value is included in reflection, otherwise the edge value forms the symmetric axis to the reflection.

Returns

pad_amt : tuple of ints, length 2

New index positions of padding to do along the axis. If these are both 0, padding is done in this dimension.

Aliases

  • numpy.lib._arraypad_impl._set_reflect_both