viewShape

abstract val viewShape: Shape(source)

The shape of this view, which may differ from the parent tensor's shape.

The view shape represents the dimensions and size as seen from the view's perspective, after applying slicing transformations. This shape determines:

  • The valid coordinate ranges for element access

  • The iteration bounds for view operations

  • The compatibility for tensor operations involving this view

Note: This property shadows the inherited shape property from Tensor, providing view-specific shape information rather than delegating to the underlying data component.

Return

the Shape describing this view's dimensional structure