Mathematical Function In Numpy Python