ArrayDims - Maple Help

ArrayDims

return the bounds of each dimension of an Array

ArrayNumDims

return the number of dimensions of an Array

 Calling Sequence ArrayDims(A) ArrayNumDims(A)

Parameters

 A - Array

Description

 • The ArrayDims(A) function returns a sequence of integer ranges representing the bounds of each dimension of Array A.
 This function is equivalent to op(2, A).
 • The ArrayNumDims(A) function returns the number of dimensions of Array A.
 This function is equivalent to nops([ArrayDims(A)]).
 • These functions cannot be used on Matrices or Vectors.

Examples

 > $A≔\mathrm{Array}\left(\left[\left[1,2,3\right],\left[4,5,6\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {4}& {5}& {6}\end{array}\right]$ (1)

ArrayDims returns the bounds of each dimension of an Array:

 > $\mathrm{ArrayDims}\left(A\right)$
 ${1}{..}{2}{,}{1}{..}{3}$ (2)

The upperbound command returns the upper bound for each dimension:

 > $\mathrm{upperbound}\left(A\right)$
 ${2}{,}{3}$ (3)

ArrayNumDims returns the number of dimensions of an Array:

 > $\mathrm{ArrayNumDims}\left(A\right)$
 ${2}$ (4)