WLJS LogoWLJS Notebook

NumericArrayQ

NumericArrayQ[expr] gives True if expr is a valid NumericArray object, and False otherwise.

  • NumericArrayQ[expr, tpatt] requires additionally that NumericArrayType[expr] match the pattern tpatt.
  • NumericArrayQ[expr, tpatt, dpatt] requires additionally that ArrayDepth[expr] match the pattern dpatt.

Examples

Check if an expression is a NumericArray:

arr = NumericArray[{1, 2, 3}, "Integer32"];
NumericArrayQ[arr]

Verify type and depth:

NumericArrayQ[arr, "Integer32", 1]

Please visit the official Wolfram Language Reference for more details.

On this page