### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Mathematical functions »

# numpy.modf

`numpy.``modf`(x[, out1, out2])

  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 Input number.
  Returns: | y1 : ndarray Fractional part of x. y2 : ndarray Integral part of x.

  Examples

      >>> np.modf(2.5)
      (0.5, 2.0)
      >>> np.modf(-.4)
      (-0.40000000000000002, -0.0)

### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Mathematical functions »