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
open allclose allBasic Examples (2)
A valid NumericArray object:
An expression with head NumericArray that is not a valid byte array object:
Scope (7)
Possible Issues (1)
The default conversion method will fail when the input array contains numbers that are out of range for the specified type.
Try to store in an "Integer8" numeric array:
Use the "ClipAndCoerce" method to automatically clip to the smallest "Integer8":
Text
Wolfram Research (2019), NumericArrayQ, Wolfram Language function, https://reference.wolfram.com/language/ref/NumericArrayQ.html.
CMS
Wolfram Language. 2019. "NumericArrayQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NumericArrayQ.html.
APA
Wolfram Language. (2019). NumericArrayQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NumericArrayQ.html