Mojo function
advanced_indexing_getitem_shape
advanced_indexing_getitem_shape[input_rank: Int, index_rank: Int, //, start_axis: Int, num_index_tensors: Int](input_shape: Index[input_rank], index_shape: Index[index_rank]) -> Index[((num_index_tensors * -1) + index_rank + input_rank)]
Calculate the output shape from advanced indexing.
Parameters:
- input_rank (
Int
): The rank of the input tensor. - index_rank (
Int
): The rank of the indexing tensors. - start_axis (
Int
): The first dimension in input where the indexing tensors are applied. It is assumed the indexing tensors are applied in consecutive dimensions. - num_index_tensors (
Int
): The number of indexing tensors.
Args:
- input_shape (
Index[input_rank]
): The shape of the input tensor in the operation. - index_shape (
Index[index_rank]
): The shape of the indexing tensors in the operation.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!