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 allBasic Examples (3)
Scope (4)
Options (2)
GenerateConditions (1)
By default, TensorDimensions quietly makes assumptions necessary for the input to be well-defined:
With GenerateConditionsTrue, TensorDimensions gives a conditional result:
With GenerateConditionsNone, TensorDimensions fails when assumptions are necessary:
Properties & Relations (2)
On explicit rectangular arrays, TensorDimensions coincides with Dimensions:
For symbolic expressions, there are no default dimensions assumed:
Text
Wolfram Research (2012), TensorDimensions, Wolfram Language function, https://reference.wolfram.com/language/ref/TensorDimensions.html (updated 2024).
CMS
Wolfram Language. 2012. "TensorDimensions." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/TensorDimensions.html.
APA
Wolfram Language. (2012). TensorDimensions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TensorDimensions.html