parameters: (shape, n, axis)
return_statement: return _slice_at_axis(shape, slice(dim - n, dim), axis=axis)
docstring: Construct a slice tuple to take the last n elements along axis
docstring_summary: Construct a slice tuple to take the last n elements along axis
docstring_tokens: Construct a slice tuple to take the last n elements along axis
function: def _slice_last(shape, n, axis):
      """ Construct a slice tuple to take the last n elements along axis """
      dim = shape[axis]  # doing this explicitly makes n=0 work
      return _slice_at_axis(shape, slice(dim - n, dim), axis=axis)
function_tokens: def _slice_last ( shape , n , axis ) : dim = shape [ axis ] # doing this explicitly makes n=0 work return _slice_at_axis ( shape , slice ( dim - n , dim ) , axis = axis )