Post

Coding with Karthik: Numpy Tutorials

Numpy is a Python library that serves as the backbone for Machine Learning. Machine Learning can be described as the confluence of three giant fields of mathematics – Calculus, Statistics, and Linear Algebra. And Numpy is all about Linear Algebra.

Diagram of a 3D numpy array's axes and shape, showing how reshape, ravel, and axis-based slicing relate to a flat array

image from https://duchesnay.github.io/pystatsml/auto_gallery/scipy_numpy.html

In Neural Networks, the weights of the neural network are represented as vectors. Input data and output result are also represented as vectors. Numpy allows the representation of these vectors and matrices along with facilitating the computation between these mathematical objects as well. What makes Numpy exceptional, however, is its speed.

Screenshot of a Jupyter Notebook benchmark comparing Numpy array operations against builtin Python loops, showing Numpy an order of magnitude faster

As seen above, Numpy is an order of magnitude faster than builtin Python!

So how do you harness the power of Numpy? I’ve curated snapshots of the different Numpy methods that you will need for your Machine Learning endeavors. They are in a Jupyter Notebook format for you to be able to play around and explore for yourself.

Download the zip file here

This post is licensed under CC BY 4.0 by the author.