(l-onnx-doc-Range)= # Range (l-onnx-op-range-11)= ## Range - 11 ### Version - **name**: [Range (GitHub)](https://github.com/onnx/onnx/blob/main/docs/Operators.md#Range) - **domain**: `main` - **since_version**: `11` - **function**: `True` - **support_level**: `SupportType.COMMON` - **shape inference**: `True` This version of the operator has been available **since version 11**. ### Summary Generate a tensor containing a sequence of numbers that begin at `start` and extends by increments of `delta` up to `limit` (exclusive). The number of elements in the output of range is computed as below: ``` number_of_elements = max( ceil( (limit - start) / delta ) , 0 ) ``` The pseudocode determining the contents of the output is shown below: ``` for(int i=0; i Range (start, limit, delta) => (output) { sub_result = Sub (limit, start) sub_result_casted = Cast (sub_result) delta_casted = Cast (delta) div_result = Div (sub_result_casted, delta_casted) ceil_result = Ceil (div_result) ceil_result_relu = Relu (ceil_result) ceil_result_relu_int = Cast (ceil_result_relu) ceil_result_relu_bool = Cast (ceil_result_relu) variadic_output, output = Loop (ceil_result_relu_int, ceil_result_relu_bool, start) ( cond_out, current, range) { cond_out = Identity (cond) current = Add (prev, delta) range = Identity (prev) }> } ``` ### Inputs - **start** (heterogeneous) - **T**: Scalar. First entry for the range of output values. - **limit** (heterogeneous) - **T**: Scalar. Exclusive upper limit for the range of output values. - **delta** (heterogeneous) - **T**: Scalar. Value to step by. ### Outputs - **output** (heterogeneous) - **T**: A 1-D tensor with same type as the inputs containing generated range of values. ### Type Constraints * **T** in ( `tensor(double)`, `tensor(float)`, `tensor(int16)`, `tensor(int32)`, `tensor(int64)` ): Constrain input types to common numeric type tensors.