Articles → Numpy → Modf Function In Numpy
Modf Function In Numpy
Purpose
- An integral part i.e., the number on the left-hand side of the decimal.
- A fractional part i.e., a number on the right-hand side of the decimal.
Example
import numpy as np
print("modf of 3.7 is :", np.modf(3.7))
print("modf of 1 is :", np.modf(1))
print("modf of -5.1 is :", np.modf(-5.1))
Output
Click to Enlarge