Skip to content

Numpy

Flatten an Array with NumPy flatten cover image

Flatten an Array with NumPy flatten

In this tutorial, you’ll learn how to flatten an array with NumPy flatten function, meaning that an array is collapsed to a single dimension. The NumPy flatten function allows you to turn a multi-dimensional array into a single-dimensional array. The

NumPy Stack Join NumPy Arrays Along Different Axes Cover Image

NumPy Stack: Join NumPy Arrays Along Different Axes

In this tutorial, you’ll learn how to use the NumPy stack() function to join NumPy arrays along various axes. NumPy is an essential Python library for anyone working with data in Python. The NumPy stack() function allows you to combine

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

NumPy Repeat Elements Function Cover Image

NumPy Repeat Function: Repeating NumPy Arrays

In this tutorial, you’ll learn how to use the NumPy repeat() function. The np.repeat() function is used to repeat arrays and provides significant opportunity to customize how the arrays are repeated. Being able to work with NumPy arrays is an

Python Array vs List Difference Between Array and List in Python Cover Image

Difference Between Array and List in Python

In this post, you’ll learn the difference between arrays and lists in Python. Both these data structures let you store data in Python and share many similar properties. However, they also let you do quite different things and knowing when

Median Absolute Deviation in Python Cover Image

How to Calculate the Median Absolute Deviation in Python

The median absolute deviation (MAD), is a robust statistic of variability that measures the spread of a dataset. In this tutorial, you’ll learn how to use Python to calculate the median absolute deviation. By the end of this tutorial, you’ll

Implementing the Sigmoid Function in Python Cover Image

Implementing the Sigmoid Function in Python

In this tutorial, you’ll learn how to implement the sigmoid activation function in Python. Because the sigmoid function is an activation function in neural networks, it’s important to understand how to implement it in Python. You’ll also learn some of

NumPy Pad Using np pad() to Pad Arrays and Matrices Cover Image

NumPy Pad: Using np.pad() to Pad Arrays and Matrices

In this tutorial, you’ll learn how to use the powerful NumPy pad function to pad arrays and matrices in NumPy and Python. The function is a powerful method that is often used in deep learning, especially in developing convolutional neural

Numpy np.where Process Array Elements Conditionally with np.where Cover Image

NumPy where: Process Array Elements Conditionally

In this tutorial, you’ll learn how to use the NumPy where() function to process or return elements based on a single condition or multiple conditions. The np.where() function is one of the most powerful functions available within NumPy. The function

np.argmax How to Use NumPy Argmax Cover Image

np.argmax(): How to Use NumPy Argmax

In this tutorial, you’ll learn how to use the NumPy argmax() function to find the index of the largest value in an array. The np.argmax() function can be used to find the maximum value across an array, as well as

NumPy linspace Creating Evenly Spaced Arrays with np.linspace

NumPy linspace: Creating Evenly Spaced Arrays with np.linspace

In this tutorial, you’ll learn how to use the NumPy linspace function to create arrays of evenly spaced numbers. This can be incredibly helpful when you’re working with numerical applications. The NumPy linspace function allows you to create evenly spaced

NumPy logspace Understanding the np logspace Function Cover Image

NumPy logspace: Understanding the np.logspace() Function

In this tutorial, you’ll learn how to use the NumPy logspace function and how to use its different parameters. The np.logspace() function is used to return numbers that are evenly spaced on a log scale. The function allows you to