slice#

static vectorious.slice(x, begin, end, step)#

Slices x in the corresponding dimension

Arguments:
  • x (NDArray)

  • begin (Number)

  • end (Number)

  • step (Number)

Returns:

NDArray

Examples:

import { slice } from 'vectorious/core/slice';

slice([1, 2, 3, 4], 0, 4, 2); // => array([1, 3])