dpnp.fmod

dpnp.fmod(x1, x2, dtype=None, out=None, where=True, **kwargs)[source]

Calculate the element-wise remainder of division.

For full documentation refer to numpy.fmod.

Limitations

Parameters x1 and x2 are supported as either dpnp.ndarray or scalar. Parameters dtype, out and where are supported with their default values. Keyword arguments kwargs are currently unsupported. Otherwise the functions will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.

See also

dpnp.reminder

Remainder complementary to floor_divide.

dpnp.divide

Standard division.

Examples

>>> import dpnp as np
>>> a = np.array([2, -3, 4, 5, -4.5])
>>> b = np.array([2, 2, 2, 2, 2])
>>> result = np.fmod(a, b)
>>> [x for x in result]
[0.0, -1.0, 0.0, 1.0, -0.5]