This is a pre-release version (latest). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy latest / numpy / lib / _arraypad_impl / _slice_at_axis

function

numpy.lib._arraypad_impl:_slice_at_axis

source: build-install/usr/lib/python3.14/site-packages/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 : slice

The slice for the given dimension.

axis : int

The axis to which sl is applied. All other dimensions are left "unsliced".

Returns

sl : tuple of slices

A 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