Return the fractional and integral part of a number.
The fractional and integral parts are negative if the given number is negative.
Parameters: | x : array_like
|
---|---|
Returns: | y1 : ndarray
y2 : ndarray
|
Examples
>>> np.modf(2.5)
(0.5, 2.0)
>>> np.modf(-.4)
(-0.40000000000000002, -0.0)