rank

open val rank: Int(source)

The number of dimensions in the tensor.

This computed property provides quick access to the tensor's dimensionality, derived from the shape's rank. Essential for dimension-aware operations and broadcasting compatibility checks.