This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

ArrayQ

ArrayQ[expr]
gives True if expr is a full array or a SparseArray object, and gives False otherwise.
ArrayQ
requires expr to be a full array with a depth that matches the pattern patt.
ArrayQ
requires also that test yield True when applied to each of the array elements in expr.
  • In a full array all parts at a particular level must be lists of the same length.
  • ArrayQ tests whether expr is either a vector or a matrix.
  • ArrayQ[expr, _, NumberQ] tests whether expr is a numerical array at all levels.
A vector of numbers is a full array:
A vector in which one element is itself a list is not a full array:
A ragged collection of nested lists is not a full array:
A vector of numbers is a full array:
In[1]:=
Click for copyable input
Out[1]=
A vector in which one element is itself a list is not a full array:
In[2]:=
Click for copyable input
Out[2]=
 
A ragged collection of nested lists is not a full array:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Test for a vector:
Test for a matrix:
Test for a vector or a matrix:
Test for a numeric vector:
Test for an array of any depth with numeric entries:
Define a function that only evaluates with arrays:
This constructs the tensor product interpolating polynomial assuming integer coordinates:
The polynomial interpolates the data:
VectorQ is a special case of ArrayQ:
MatrixQ is a special case of ArrayQ:
New in 5