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 function
extend_shape
def extend_shape[rank: Int](in_shape: IndexList[rank], first: Int, last: Int) -> IndexList[(rank + Int(2))]
Extend input shape by inserting first and last at both ends.
Parameters:
- βrank (
Int): Spatial rank of the input shape.
Args:
- βin_shape (
IndexList[rank]): Input shape to extend. - βfirst (
Int): Value inserted at the front of the shape. - βlast (
Int): Value inserted at the back of the shape.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!