({{, (RefLink[ArrayQ, paclet:ref/ArrayQ])[expr]
gives (RefLink[True, paclet:ref/True]) if expr is a full array or a (RefLink[SparseArray, paclet:ref/SparseArray]) object, and gives (RefLink[False, paclet:ref/False]) otherwise. }, {, (RefLink[ArrayQ, paclet:ref/ArrayQ])[expr,patt]
requires expr to be a full array with a depth that matches the pattern patt. }, {, (RefLink[ArrayQ, paclet:ref/ArrayQ])[expr,patt,test]
requires also that test yield (RefLink[True, paclet:ref/True]) when applied to each of the array elements in expr. }})

OpenersNotesSection(Spacer1)Details

In a full array all parts at a particular level must be lists of the same length.

(RefLink[ArrayQ, paclet:ref/ArrayQ])[expr,1|2] tests whether expr is either a vector or a matrix.

(RefLink[ArrayQ, paclet:ref/ArrayQ])[expr,_,(RefLink[NumberQ, paclet:ref/NumberQ])] tests whether expr is a numerical array at all levels.

OpenersPrimaryExamplesSection(Spacer1)Examples  (10)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

A vector of numbers is a full array:

ArrayQ[{1,2,3,4}]

A vector in which one element is itself a list is not a full array:

ArrayQ[{1,2,{3},4}]

A ragged collection of nested lists is not a full array:

ArrayQ[{{1,2},{3}}]

ArrayQ[{{1,2},{3,4}}]

OpenersExampleSection1(Spacer1)Scope  (5)

Test for a vector:

ArrayQ[{1,2,3,4},1]

Test for a matrix:

ArrayQ[{1,2,3,4},2]

ArrayQ[{{1,2},{3,4}},2]

Test for a vector or a matrix:

ArrayQ[{1,2,3,4},1|2]

Test for a numeric vector:

ArrayQ[{1,2,3,x},1,NumericQ]

Test for an array of any depth with numeric entries:

ArrayQ[{{{E,1},{Pi,2}},{{Sin[1],Cos[2]},{Sinh[1],Cosh[1]}}},_,NumericQ]

OpenersExampleSection2(Spacer1)Applications  (1)

Define a function that only evaluates with arrays:

iptp[a_?ArrayQ,x_] := Module[{n,perm,at=a},
n=ArrayDepth[a];
Do[
at = Transpose[at,RotateRight[Range[ArrayDepth[at]]]];
at=Map[InterpolatingPolynomial[#,(Subscript[x, i])]&,at,{n-i}],
{i,n}];
at]

This constructs the tensor product interpolating polynomial assuming integer coordinates:

data= {{{1,2,3,4},{5,6,7,8},{9,10,11,12}},{{13,14,15,16},{17,18,19,20},{21,22,23,24}}};
poly=iptp[data,x]

The polynomial interpolates the data:

pos = Position[data, _?NumberQ];
poly /. Map[Thread[{(Subscript[x, 1]),(Subscript[x, 2]),(Subscript[x, 3])}->#]&,pos]

%===Extract[data,pos]

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

(RefLink[VectorQ, paclet:ref/VectorQ]) is a special case of (RefLink[ArrayQ, paclet:ref/ArrayQ]):

v={1,2.,E,Pi+I};

{VectorQ[v],ArrayQ[v,1]}

{VectorQ[v,NumericQ],ArrayQ[v,1,NumericQ]}

{VectorQ[v,Im[#]==0&],ArrayQ[v,1,Im[#]==0&]}

(RefLink[MatrixQ, paclet:ref/MatrixQ]) is a special case of (RefLink[ArrayQ, paclet:ref/ArrayQ]):

m=RandomReal[1,{2,2}]

{ArrayQ[m,2],MatrixQ[m]}

{ArrayQ[m,2,MachineNumberQ],MatrixQ[m,MachineNumberQ]}

{ArrayQ[m,2,IntegerQ],MatrixQ[m,IntegerQ]}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ArrayDepth, paclet:ref/ArrayDepth])  ▪  (RefLink[MatrixQ, paclet:ref/MatrixQ])  ▪  (RefLink[VectorQ, paclet:ref/VectorQ])  ▪  (RefLink[Dimensions, paclet:ref/Dimensions])  ▪  (RefLink[PadLeft, paclet:ref/PadLeft])  ▪  (RefLink[ArrayFlatten, paclet:ref/ArrayFlatten])  ▪  (RefLink[Array, paclet:ref/Array])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Putting Constraints on Patterns, paclet:tutorial/PuttingConstraintsOnPatterns])}, {▪(RefLinkPlain[Nested Lists, paclet:tutorial/NestedLists])}, {▪(RefLinkPlain[Tensors, paclet:tutorial/Tensors])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Testing Expressions, paclet:guide/TestingExpressions])}, {▪(RefLinkPlain[Tensors, paclet:guide/Tensors])}, {▪(RefLinkPlain[Elements of Lists, paclet:guide/ElementsOfLists])}})}})