5) Learning Numpy, Pandas, and Matplotlib Link

How to learn NumPy - NumPy Course

By Gilad Gressel
Numpy logo

Numpy is a bit of a struggle to learn because its documentation is less than stellar. When I was learning machine learning, my good friend, who is a Numpy expert, told me, "I know a lot of Numpy, and I can't understand the docs". I'm not sure why they are so difficult to understand, but I don't think I am alone in being confused by them. At best, they give some examples which highlight what is going on.

How to Learn Numpy

Therefore, my best tips for learning Numpy are:

  • Complete the NumPy course I created here on CodingNomads.
  • Find good stack overflow questions with highly rated answers (see my example below).
  • Learn by example through experimentation.

Additional Resource

Explore CodingNomads' NumPy course by clicking the link below.

CodingNomads' NumPy Course

How to Learn Numpy

My advice for learning Numpy is:

  • Complete CodingNomads' Numpy course
  • Find good stack overflow questions with highly rated answers (see my example below)
  • Learn by example through experimentation

Numpy Resources

  1. CodingNomads' NumPy Course
  2. The Numpy Documentation
  3. Numpy Quick Start Guide
  4. Jake Vanderplas's Basics of Numpy

Quick Overview

Numpy - Numerical Python is the heartbeat of all machine learning in Python. Its fundamental unit is the ndarray, which stands for "n-dimensional array". However, you will almost never interact with the ndarray. You will always call it through NumPy's array function.

The difference between ndarray and array is explained here.
https://stackoverflow.com/questions/15879315/what-is-the-difference-between-ndarray-and-array-in-numpy

Now, a Numpy array is basically a list, which can become a list of lists. If you know linear algebra, you can think of it as a tensor. For our purposes, you just need to know that the Numpy array is our main container, which you will use to hold all our data. Whenever you want to operate on data in a quick fashion, you will vectorize our code using Numpy arrays.

Vectorization refers to highly optimized linear algebra routines that Numpy has coded for you under the hood. This allows you to make transformations on our data at lightning speed and honestly makes all of machine learning possible.

Here are a few videos that I find fascinating - they answer the question, "What is a high-performance linear algebra actually?" - here are two videos, one for algorithms and one for hardware: These videos are not at all required or even really helpful in doing data science. It just answers the question, "Why is it so important to have a library like Numpy"?

Strassens Subcubic Matrix Multiplication:

High Performance Matrix Multiplication at the Hardware Level:

Summary: How to Learn NumPy

  • Complete CodingNomads' NumPy course
  • Numpy documentation isn't great
  • Learn by finding good stack overflow questions with high ratings
  • Learn by example and experimentation
  • A Numpy array is basically a list