naturals ( shape -- tensor )
Tensors ยป Creating Tensors

Prev:ones ( shape -- tensor )
Next:arange ( a b step -- tensor )


Vocabulary
tensors

Inputs
shapea sequence


Outputs
tensora tensor


Word description
Initializes a tensor with shape shape containing a range of values from 0 to shape product.

Errors
Throws a non-positive-shape-error if the given shape has zero or negative values.

Definition