{ } Raw JSON

bundles / numpy 2.4.4 / numpy / lib / _arraypad_impl / _get_linear_ramps

function

numpy.lib._arraypad_impl:_get_linear_ramps

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

Signature

def   _get_linear_ramps ( padded axis width_pair end_value_pair )

Summary

Construct linear ramps for empty-padded array in given dimension.

Parameters

padded : ndarray

Empty-padded array.

axis : int

Dimension in which the ramps are constructed.

width_pair : (int, int)

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

end_value_pair : (scalar, scalar)

End values for the linear ramps which form the edge of the fully padded array. These values are included in the linear ramps.

Returns

left_ramp, right_ramp : ndarray

Linear ramps to set on both sides of padded.

Aliases

  • numpy.lib._arraypad_impl._get_linear_ramps