Divides each element of the input input with the scalar value and returns a new resulting tensor or,

# S3 method for tensor
/(x, other)

Arguments

x

tensor object

other

scalar or tensor to divide by.

Details

Each element of the tensor input is divided by each element of the tensor other. The resulting tensor is returned. The shapes of input and other must be broadcastable.

Examples

tensor(1:10)/2
#> tensor #> 0 #> 1 #> 1 #> 2 #> 2 #> 3 #> 3 #> 4 #> 4 #> 5 #> [ Variable[CPUIntType]{10} ]
tensor(1:10)/tensor(10:1)
#> tensor #> 0 #> 0 #> 0 #> 0 #> 0 #> 1 #> 1 #> 2 #> 4 #> 10 #> [ Variable[CPUIntType]{10} ]