Photo by Andrew Buchanan on Unsplash

If you have just started or you are looking for a quick reference to useful numpy functions then you are in the right place. For advanced methods, this page might seem very basic, but hey check out, who knows you might find something interesting :)

Now, i have tried to cover some key areas, where we often struggle: looping, doing some indexing, slicing, statistics and (not to forget) linear algebra. Also, consider my methods or approaches as few of the many possibilities offered by numpy.

Let’s dive in:

created similarly but 2-d, 3-d, 4-d
using arange then reshape
arr[x,y] -> x handles the rows and y handles the columns
np.nditer by default don’t allow users to modify elements but we can do it by using op_flags

a. variance and standard deviation

b. percentile

c. weighted average

d. covariance and correlation

the ones that are frequently used are dot, matmul, inner product, tensor product and an understanding of how a linear equation can be transformed into a matrix form will be useful.

a. dot and matmul

b. inner and tensor

c. Linear equation to matrix form

That’s all for this time. Hope you all like it :)

Happy learning !


I am working as a Senior Data Scientist at Hewlett Packard Enterprise. I love exploring new ideas and new places !! :)