NumPy Squeeze Removing Dimensionality from NumPy Arrays Cover Image

NumPy Squeeze: Removing Dimensionality from NumPy Arrays

In this tutorial, you’ll learn how to use the NumPy squeeze() function. The np.squeeze() function allows you to remove single-dimensional entries from an array’s shape. This allows you to better transform arrays that aren’t shaped in the way that makes sense for the work that you’re doing. In short, the function returns the input array

NumPy Squeeze: Removing Dimensionality from NumPy Arrays Read More »

How to Create 3D Scatterplots in Matplotlib Cover Image

How to Create 3D Scatterplots in Matplotlib

In this tutorial, you’ll learn how to make 3D scatterplots using Matplotlib. Being able to visualize data in three dimensions can be an important step in clearly articulating data, especially in science and machine learning. By the end of this tutorial, you’ll have learned: How to plots 3D scatterplots using Matplotlib How to change size,

How to Create 3D Scatterplots in Matplotlib Read More »

How to Calculate Percentiles in NumPy with np percentile Cover Image

How to Calculate Percentiles in NumPy with np.percentile

In this tutorial, you’ll learn how to calculate percentiles in NumPy using the np.percentile() function. A percentile is a measure that indicates the value below which a percentage of observations in a group fall. For example, the 50th percentile will return the value from which half of the values are under. Knowing how to calculate

How to Calculate Percentiles in NumPy with np.percentile Read More »