**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:**

**Numpy**

## 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 Array: Numpy 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.

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.

Example

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 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:**

## 0 Comments:

## Post a comment