numpy.modf(x,[out1,out2,]/,[out=(None,None),]*,where=True,casting='same_kind',order='K',dtype=None,subok=True[,signature,extobj]) = <ufunc 'modf'>¶Return the fractional and integral parts of an array, element-wise.
The fractional and integral parts are negative if the given number isnegative.
| Parameters: |
|
|---|---|
| Returns: |
|
See also
divmoddivmod(x,1) is equivalent tomodf with the return values switched, except it always has a positive remainder.Notes
For integer input the return values are floats.
Examples
>>>np.modf([0,3.5])(array([ 0. , 0.5]), array([ 0., 3.]))>>>np.modf(-0.5)(-0.5, -0)