({{, (RefLink[ArrayDepth, paclet:ref/ArrayDepth])[expr]
gives the depth to which expr is a full array, with all the parts at a particular level being lists of the same length, or is a (RefLink[SparseArray, paclet:ref/SparseArray]) object. }})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[ArrayDepth, paclet:ref/ArrayDepth])[list] is equivalent to (RefLink[Length, paclet:ref/Length])[(RefLink[Dimensions, paclet:ref/Dimensions])[list]].

OpenersPrimaryExamplesSection(Spacer1)Examples  (5)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Find the depth to which an array is full:

ArrayDepth[{{a,b},{c,d}}]

ArrayDepth[{{a,b},{c}}]

OpenersExampleSection1(Spacer1)Scope  (2)

Find the depth of a (RefLink[SparseArray, paclet:ref/SparseArray]):

s=SparseArray[{i_,i_,j_}->j/(i+1),{3,4,5}]

ArrayDepth[s]

Find the array depth of a list of sparse matrices:

sl=Table[SparseArray[{i_,i_}->j/i,{3,3}],{j,4}]

ArrayDepth[sl]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (1)

Use a head other than (RefLink[List, paclet:ref/List]):

ArrayDepth[f[f[a,b],f[c,d]]]

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

(RefLink[ArrayDepth, paclet:ref/ArrayDepth]) gives the length of the dimensions list:

Dimensions[Array[a,{4,5,2}]]

ArrayDepth[Array[a,{4,5,2}]]

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

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

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