Implementing kernel
C++ engine symbols that back this Python API.Element-wise Python-style modulo.
Returns input - n * other where n is the result of flooring input / other. The sign of the result matches the sign of other (Python convention), in contrast to fmod.
Parameters
Returns
TensorElement-wise result with shape broadcast(input.shape, other.shape) and
dtype determined by the usual type-promotion rules.
Notes
Mathematical definition:
Equivalent to the Python % operator on floats.
Examples
>>> import lucid
>>> a = lucid.tensor([1.0, 2.0, 3.0])
>>> b = lucid.tensor([4.0, 5.0, 6.0])
>>> lucid.remainder(a, b)
Tensor([...])