IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /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. /get-started.md).

Mojo function

to_index_list

def to_index_list[rank: Int, element_type: DType = DType.int64](t: IntTuple) -> IndexList[rank, element_type=element_type]

Converts an IntTuple to a flattened IndexList with the same values.

Parameters:

  • โ€‹rank (Int): The rank of the resulting IndexList.
  • โ€‹element_type (DType): Element type, must be integer type.

Args:

  • โ€‹t (IntTuple): The IntTuple defining the values.

Returns:

IndexList[rank, element_type=element_type]: An IndexList filled with the values of t.

Was this page helpful?