Mojo function
to_index_list
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): TheIntTupledefining the values.
Returns:
IndexList: An IndexList filled with the values of t.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!