NUMPY

Lists Recap

  • Powerful
  • Collection of values
  • Hold different types
  • Change, add, remove
  • Need for Data Science 

Why do we NEED it in DS?

  • Mathematical operations over collections
  • Speed 

Alternative to Python List

NUMPY ARRAY

CALCULATION 

over entire arrays

Numpy arrays contain only one type

import numpy as np a = np.array([1, 2, 3], dtype = complex)

print (a)

[ 1.+0.j,  2.+0.j,  3.+0.j]

INSTALLATION 

In the TERMINAL:

command:  pip3 install numpy

M

By Andy Xu