IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

Index

Index[*Ts: Intable, *, dtype: DType = DType.int64](*args: *Ts.values) -> IndexList[VariadicPack.__len__(), element_type=dtype]

Constructs an N-D Index from the given values.

Parameters:

  • *Ts (Intable): The types of the arguments (must be Intable).
  • dtype (DType): The integer type of the underlying element of the resulting list.

Args:

  • *args (*Ts.values): The values to construct the index from.

Returns:

IndexList[VariadicPack.__len__(), element_type=dtype]: The constructed IndexList.