This lesson is still being designed and assembled (Pre-Alpha version)

Introduction to Numpy

Overview

Time: min
Objectives

What is Numpy?

NumPy is a Python library used for working with arrays.It also has functions for working in domain of linear algebra, fourier transform, and matrices.

Why Use NumPy?

In Python we have lists that serve the purpose of arrays, but they are slow to process.

NumPy aims to provide an array object called ndarray that is up to 50x faster than traditional Python lists.

Installation of Numpy

Numpy can be installed by typing the following command - “pip install numpy”

How to use Numpy?

In order to use Numpy, we need to import the package first. This can be done by typing “import numpy”.


import numpy 

arr = numpy.array([1, 2, 3, 4, 5])

print(arr)

Key Points