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.
NumPy for Data Science
Get introduced to NumPy, including learning how it’s used in data science.
Indexing and Slicing NumPy Arrays
Learn how to access items in NumPy arrays, using special methods reserved for NumPy.
Using the NumPy where() Function
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.
NumPy arange() Function
Learn how to create sequences of numbers using the NumPy arange() function.
NumPy linspace() Function
Learn how to create evenly spaced arrays using the NumPy linspace() function.
NumPy logspace() Function
Learn how to create evenly spaced arrays on a log scale using the NumPy logspace() function.
NumPy zeros() Function
Learn how to create arrays of zeros using the NumPy zeros() function.
NumPy full() Function
Learn how to create arrays of a single value using the NumPy full() function.
NumPy Normal Distribution
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 Concatenate NumPy Arrays
How to join and concatenate multiple NumPy arrays into a single array.
How to Map a Function Over a NumPy Array
How to apply a function to every element in a NumPy array.
How to Normalize NumPy Arrays
How to normalize the values in a NumPy array.
How to Limit Array Values with np.clip()
How to clip minimum and maximum values in a NumPy array to prevent extreme values.
How to Pad NumPy Arrays with np.pad()
How to pad a NumPy array with values to modify their size.
How to Stack NumPy Arrays with np.stack()
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.
How to Reduce Dimensionality of NumPy Arrays
Learn how to use the np.squeeze() function to reduce the dimensions of an array.
How to Tile NumPy Arrays with np.tile()
Learn how to repeat NumPy arrays in a pattern using np.tile()
How to Flatten a NumPy Array
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.
How to Find the Index of the Max Value Using np.argmax()
Learn how to find the index of the largest value in a NumPy array.
How to Find the Index of the Min Value Using np.argmin()
Learn how to find the index of the smallest value in a NumPy array.
How to Calculate the Dot Product Using NumPy
Learn how to calculate the dot product of NumPy arrays.
How to Calculate a Histogram of a NumPy Array
Learn how to bin NumPy arrays into and find frequencies of array values.
How to Calculate Cumulative Sums of NumPy Arrays
Learn how to calculate cumulative sums of NumPy array values using the np.cumsum() function.
How to Raise NumPy Arrays to Exponents
Learn how to raise array elements to an exponent using the np.exp() function.