pytaco.remainderļƒ

pytaco.remainder(e1, e2)ļƒ

Return element wise remainder of division.

The sign of the result is always equivalent to the dividend.

Parameters
e1: index_expression

The dividend expression

e2: index_expression

The divisor expression

Returns
An expression representing the element-wise remainder of the input tensors.

Warning

This should not be confused with the python modulus operator.

This is equivalent to Cā€™s remainder.

Examples

>>> import pytaco as pt
>>> rem = pt.remainder(5, 2)
>>> t = pt.tensor()
>>> t[None] = rem
>>> t[0]
1.0