Numpy is the core library for scientific computing in Python. It provides a high-performance multidimensional array object, and tools for working with these arrays.
Why learn Numpy?
In the Introductory Course on Machine learning, we will be using numpy to build the models introduced in Andrew Ng’s Machine Learning course and solve the excercises. Note that octave is used in that course instead. Since most of the existing machine learning frameworks today are based on python (Tensorflow, Theano, etc), I figured it would be practical to use numpy to understand these basic machine learning models. Numpy is also easy to learn and experiment with and it plays well with the Tensorflow and Theano.
We will be working with arrays. Arrays are numpy objects of type ndarray. They contain elements of type dtype and have a particular shape.
Numpy arrays from python lists
Convert a list to numpy array
Create a null vector of size 10
Create a vector with values ranging from 10 to 49
Create a 3x3 matrix with values ranging from 0 to 8
Create a 3x3 identity matrix
Create a 3x2x2 array with random values
Create a 4x4 array (x) with random integers from 0-99