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
range_shape
def range_shape[dtype: DType](start: Scalar[dtype], stop: Scalar[dtype], step: Scalar[dtype]) -> IndexList[Int(1)]
Computes the output shape for the mo.range graph op.
Parameters:
- βdtype (
DType): Element type of the range values.
Args:
- βstart (
Scalar[dtype]): First value of the range. - βstop (
Scalar[dtype]): Exclusive upper or lower bound of the range. - βstep (
Scalar[dtype]): Spacing between consecutive values; must be non-zero.
Returns:
IndexList[Int(1)]: The output shape [num_elements] for the range tensor.