IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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 module

reshape

Implements the reshape operation that reinterprets a contiguous tensor's data under a new shape.

Functionsโ€‹

  • โ€‹reshape: Returns a view of the contiguous input tensor reinterpreted under new_shape with matching element count.
  • โ€‹reshape_shape: Reads a target shape from a buffer and returns it as a static IndexList, inferring any single -1 dimension.

Was this page helpful?