How to use Numpy flatten

An image that shows how Numpy flatten works.

This tutorial will show you how to use the Numpy flatten method. It will explain the syntax of the method and show you how to flatten an array in Numpy. The following is a table of contents. If you’re looking for something specific, you can click on any of the links to jump to the … Read more

np.random.randint Explained

This tutorial will explain how to use the np.random.randint function from Numpy (AKA, Numpy random randint). Ultimately, you’ll learn how to use Numpy to generate random integers drawn from a uniform distribution. The tutorial will explain the syntax of np.random.randint. It will also show you clear, step-by-step examples of how to use np.random.randint. The tutorial … Read more

Numpy log explained

An image that shows how Numpy log calculates the natural logarithm in Python.

In this tutorial, you’ll learn how to use the Numpy log function to calculate logarithms in Python. This tutorial will explain the syntax of np.log, and it will also show you step-by-step examples of Numpy log that you can run yourself. If you have something specific that you need, you can click on any of … Read more

Numpy standard deviation explained

An image that shows Numpy standard deviation computing the standard deviation of a Numpy array.

This tutorial will explain how to use the Numpy standard deviation function (AKA, np.std). At a high level, the Numpy standard deviation function is simple. It calculates the standard deviation of the values in a Numpy array. But the details of exactly how the function works are a little complex and require some explanation. That … Read more

Numpy where explained

An image that shows the syntax of Numpy where, intended as the Featured Image.

In this tutorial, I’ll show you how to use the Numpy where function. I’ll explain what np.where is and also how the syntax of np.where works. Later in the tutorial, I’ll show you clear, step-by-step examples of how the function works, so you can see it in action. If you need to find something specific, … Read more

How to Use Numpy vstack

In this tutorial, I’ll explain how to use the NumPy vstack function, which is also called numpy.vstack or np.vstack. This is a very simple NumPy function, but in case you’re more of a beginner, this tutorial will explain almost everything you need to know. It will give you a quick background to NumPy, explain the … Read more

How to Use Numpy Empty

An image that shows how NumPy empty creates an 'empty' NumPy array.

This tutorial will explain the NumPy empty function (AKA np.empty) and will show you how to create an empty array in NumPy. The tutorial assumes that you have somewhat limited experience with NumPy. As such, it starts with a quick review of NumPy, then proceeds to an explanation of the NumPy empty function. Later, the … Read more

How to Use Numpy Full

This tutorial will explain how to use he Numpy full function in Python (AKA, np.full or numpy.full). Numpy full creates a Numpy array filled with the same value At a high level, the Numpy full function creates a Numpy array that’s filled with the same value. It’s a fairly easy function to understand, but you … Read more

How To Use Numpy Tile

This tutorial will explain how to use the NumPy tile function (AKA, np.tile or numpy tile). Without getting into any of the details yet, let me explain what NumPy tile does. NumPy tile creates a new array by repeating an input array At a very high level, the NumPy tile function creates a new NumPy … Read more

How to use numpy repeat

This tutorial will explain how to use the NumPy repeat function, which is also called np.repeat or numpy.repeat. Numpy repeat repeats the elements of an array The NumPy repeat function essentially repeats the numbers inside of an array. It repeats the individual elements of an array. Having said that, the behavior of NumPy repeat is … Read more