What is a Python NumPy?
How do I install NumPy?
Moving ahead in python numpy tutorials, let us understand what exactly is a multi-dimensional Numpy array.
Trigonometric Function
import numpy as np a = np.array([0,30,45,60,90]) print 'Sine of different angles:' # Convert to radian by multiplying with pi/180 print np.sin(a*np.pi/180) print '\n' print 'Cosine values for angles in array:' print np.cos(a*np.pi/180) print '\n' print 'Tangent values for given angles:' print np.tan(a*np.pi/180)
Sine of different angles: [ 0. 0.5 0.70710678 0.8660254 1. ] Cosine values for angle in array: [ 1.00000000e+00 8.66025404e-01 7.07106781e-01 5.00000000e-01 6.12323400e-17] Tangent values for given angle: [ 0.00000000e+00 5.77350269e-01 1.00000000e+00 1.73205081e+00 1.63312394e+16]for detail information please open below drive link:
https://drive.google.com/open?
FOR DETAILED PLEASE CLICK BELOW: