Sunday 10 May 2020

What is Numpy library in python? | python crash course_01

What is the Numpy library in python?
 Hello everyone, welcome to my python crash course. In the previous blog post, I released the python syllabus so it's time to start the tutorial. Let's start:


What is a Python NumPy?

Numpy is Python package that stands for ‘Numerical Python’. It is the core library for scientific computing, which contain a powerful n-dimensional array object, provide tool for integrating C, C++, etc. It is also useful in linear algebra, random number capability. Numpy array can also used as an efficient multi-dimensional container for generic data. Now, let me tell you what exactly is python Numpy array.
NumPy ArrayNumpy array is powerful N-dimensional array object which is in the form of row and column. We can initialize numpy arrays from nested Python lists and access it element. In order to perform these numpy operation, the next question which will come in your mind is:

How do I install NumPy?

To install Python Numpy, go to your command prompt and type “pip install Numpy”. Once the installation is completed, go to your IDE and simply import it by typing: “Import Numpy as np”
Moving ahead in python numpy tutorials, let us understand what exactly is a multi-dimensional Numpy array.

Trigonometric Function

Numpy has standard trigonometric function which return trigonometric ratios for a given angle in radian.

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) 
output is:
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

Tangent values for given angle:
[  0.00000000e+00   5.77350269e-01   1.00000000e+00   1.73205081e+00
for detail information please open below  drive link:
(NOTE: If any question then comment)
                                                          BEST OF LUCK!!!!!


Post a Comment

Popular Posts


AI (27) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (119) C (77) C# (12) C++ (82) Course (63) Coursera (181) Cybersecurity (24) data management (11) Data Science (97) Data Strucures (6) Deep Learning (9) Django (6) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flutter (1) FPL (17) Google (19) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (92) Leet Code (4) Machine Learning (46) Meta (18) MICHIGAN (5) microsoft (4) Pandas (3) PHP (20) Projects (29) Python (765) Python Coding Challenge (255) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (40) UX Research (1) web application (8)


Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses