check#

static vectorious.check(x)#

Asserts if indices i, j, …, n are within the bounds of x

Arguments:
  • x (NDArray)

  • ...indices (Array.<Number>)

Throws:

Error – index out of bounds

Examples:

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

check([0.5, 1.5, 2.5], 3); // Error: index out of bounds