TensorDimensions

TensorDimensions[tensor]

gives the list of dimensions of tensor.

Details and Options

  • TensorDimensions accepts any type of tensor, either symbolic or explicit, including any type of array.
  • On explicit rectangular arrays, TensorDimensions coincides with Dimensions. On symbolic arrays, TensorDimensions stays unevaluated unless the array has been assigned a rank through any form of assumption.

Examples

open allclose all

Basic Examples  (2)

Dimensions of an array:

In[1]:=
Click for copyable input
Out[1]=

Dimensions of a symbolic array expression:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Scope  (3)

Options  (1)

Properties & Relations  (2)

Possible Issues  (1)

See Also

Dimensions  Arrays  Matrices  Vectors  TensorRank  ArrayDepth

Tutorials

Introduced in 2012
(9.0)