For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo trait
Tensor
Metadata trait exposing a tensor's element type, known rank, and shape.
Implemented traitsβ
comptime membersβ
dtypeβ
comptime dtype
rankβ
comptime rank
ShapeTypeβ
comptime ShapeType
Required methodsβ
shapeβ
def shape(self) -> Self.ShapeType
Returns the tensor's runtime shape.
Returns:
_Self.ShapeType: The shape as a Coord of the argument's ShapeType.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!