get_shape() returns the shape of an array expression, a matrix
expression or an explicit array, as a list of dimensions (an empty list
for a scalar). get_ndim() returns the number of axes, and get_rank()
is its older name.
Examples
A <- ArraySymbol("A", c(3, 3, 4))
get_shape(A)
#> [[1]]
#> 3
#>
#> [[2]]
#> 3
#>
#> [[3]]
#> 4
#>
get_ndim(ArrayContraction(A, c(0, 1)))
#> [1] 1