Handbook
Glossary
naturals ( shape -- tensor )
Tensors
ยป
Creating Tensors
Prev:
ones ( shape -- tensor )
Next:
arange ( a b step -- tensor )
Vocabulary
tensors
Inputs
shape
a
sequence
Outputs
tensor
a
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
USING:
kernel
ranges
sequences
tensors.private
;
IN:
tensors
:
naturals
( shape -- tensor )
check-shape
dup
product
[0..b)
>float-array
<tensor>
;