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
extend_shape
def extend_shape(in_shape: Coord[*in_shape.element_types], first: Int, last: Int) -> DynamicCoord[.int64, (Int(len(in_shape.element_types.values)) + Int(2))]
Extend input shape by inserting first and last at both ends.
Args:
- โin_shape (
Coord[*in_shape.element_types]): 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:
DynamicCoord[.int64, (Int(len(in_shape.element_types.values)) + Int(2))]