NumPy Learning Path
Get started with the fundamental package for scientific computing with Python
Getting Started with NumPy
NumPy is a foundational Python library for data science, math, and scientific computing. If you’re not coming from a scientific or math background, NumPy can seem intimidating. But, don’t worry! The tutorials below get you started with the main concepts of NumPy and really demonstrate its power.
Get introduced to NumPy, including learning how it’s used in data science.
Learn how to access items in NumPy arrays, using special methods reserved for NumPy.
Learn how to process NumPy arrays conditionally.
Creating NumPy Arrays
NumPy arrays are a foundational component of NumPy. Learning how to create them programmatically is a critical skill in working with NumPy. The library provides a ton of flexibility in creating useful arrays, such as sequences of numbers or even evenly-spaced arrays.
Learn how to create sequences of numbers using the NumPy arange() function.
Learn how to create evenly spaced arrays using the NumPy linspace() function.
Learn how to create evenly spaced arrays on a log scale using the NumPy logspace() function.
Learn how to create arrays of zeros using the NumPy zeros() function.
Learn how to create arrays of a single value using the NumPy full() function.
Learn how to create random normal distributions using the NumPy normal() function.
Modifying Arrays in NumPy
Once you’ve created your arrays in NumPy, you may want to modify them. NumPy makes modifying array items easier, allowing you to map functions to each item in an array. Learn how to normalize and limit array values, map a function over each item, and so much more.
How to join and concatenate multiple NumPy arrays into a single array.
How to apply a function to every element in a NumPy array.
How to normalize the values in a NumPy array.
How to clip minimum and maximum values in a NumPy array to prevent extreme values.
How to pad a NumPy array with values to modify their size.
How to stack NumPy arrays horizontally and vertically.
Reshaping Arrays in NumPy
Being able to reshape your arrays is an essential skill once you move into machine learning and deep learning. NumPy makes reshaping arrays incredibly simple and intuitive. The resources below guide you through the key functions you need to know.
Learn how to use the np.squeeze() function to reduce the dimensions of an array.
Learn how to repeat NumPy arrays in a pattern using np.tile()
Learn how to flatten a NumPy array using the np.flatten() function
Calculating Values with NumPy
NumPy wouldn’t be a math library without being able to calculate values. The resources below provide essential guides to working with NumPy arrays, including finding values and calculating histograms.
Learn how to find the index of the largest value in a NumPy array.
Learn how to find the index of the smallest value in a NumPy array.
Learn how to calculate the dot product of NumPy arrays.
Learn how to bin NumPy arrays into and find frequencies of array values.
Learn how to calculate cumulative sums of NumPy array values using the np.cumsum() function.
Learn how to raise array elements to an exponent using the np.exp() function.