jax.numpy.modf

Contents

jax.numpy.modf#

jax.numpy.modf(x, /, out=None)[source]#

Return the fractional and integral parts of an array, element-wise.

LAX-backend implementation of numpy.modf().

Original docstring below.

The fractional and integral parts are negative if the given number is negative.

Parameters:

x (array_like) – Input array.

Returns:

  • y1 (ndarray) – Fractional part of x. This is a scalar if x is a scalar.

  • y2 (ndarray) – Integral part of x. This is a scalar if x is a scalar.

Return type:

tuple[Array, Array]