shape - returns the shape of a value
arr.shape()
The shape of any array or scalar may be queried vi the
shape()
method. A new PackInt
array is created, regardless of the rank()
of the
value. The shape of a scalar is the empty PackInt
array 0->iterate()
.
A PackInt
array containing the shape of the
scalar or array.
ArgCheck
if any arguments are passed
a = [2,3].iterate() a.shape() 2 3 a = "" a.shape() 0 // The shape of an array is not a scalar a.shape() == 0 false // The shape of a scalar is the empty **##PackInt##** array a = 3 a.shape() a.shape().shape() 0