bundles / numpy 2.4.4 / numpy / lib / _arraypad_impl / _slice_at_axis
function
numpy.lib._arraypad_impl:_slice_at_axis
source: /numpy/lib/_arraypad_impl.py :34
Signature
def _slice_at_axis ( sl , axis ) Summary
Construct tuple of slices to slice an array in the given dimension.
Parameters
sl: sliceThe slice for the given dimension.
axis: intThe axis to which
slis applied. All other dimensions are left "unsliced".
Returns
sl: tuple of slicesA tuple with slices matching shape in length.
Examples
np._slice_at_axis(slice(None, 3, -1), 1)
⚠Aliases
-
numpy.lib._arraypad_impl._slice_at_axis