klyn.math.NDArray._sliceAxes
method
public _sliceAxes(notnull specifications as Long[]) as NDArray<T>
Description

Internal entry point for multidimensional slice syntax. Slices are owned contiguous copies, not strided aliases. Integer axes disappear; omitted axes select their full extent. Only selected elements are copied, with O(rank) planning memory and no materialization of the whole source.

Parameters
ParameterDescription
specificationsPacked (start, stop, step, flags) groups per axis.
Returns

NDArray<T> containing the selected elements in row-major order.

Throws
  • IndexException for an invalid integer coordinate or too many axes.
  • ValueException for malformed descriptors or a zero step.
  • NullException if specifications is null at runtime; statically null arguments are rejected with TypeError.
Example

longitudes = features[:, 7]

reversed = images[::-1, :, ::-2]