Introduction To Data Science : NumPy

NumPy is a python library, which is used to deal with multi dimensional arrays and matrices. NumPy stands for Numerical Python Library. This is an open source library which has many contributors. Almost all the projects in data science and machine learning in python uses this powerful library to make calculations faster.

In this article I am going to give you a basic idea on NumPy for data science usages. You can find codes to perform mathematical and logical operations on arrays/matrices using NumPy. I am using Python3 to perform those operations.

Import Numpy

1-D / 2-D / 3-D Arrays

OUTPUT

Adding Arrays

OUTPUT

Observe Characteristics of Array

OUTPUT

Reshape Array

OUTPUT

Linspace Function

Function,which will generate 1-D array, which contains numbers between two given numbers.

OUTPUT

Slice Function

OUTPUT

Min Max Sum

OUTPUT

Addition Matrices

OUTPUT

Subtract Matrices

OUTPUT

Multiply Matrices

OUTPUT

Ravel Function

This function is used to return contiguous flattened array

OUTPUT

Sum of Axes

OUTPUT

Sqrt Function

OUTPUT

Standard Deviation

OUTPUT

Exp Function

OUTPUT

Log Function

OUTPUT