Numpy Unique, Explained

An image that shows how the Numpy unique function identifies unique values.

This tutorial will explain how to use the Numpy unique function. It will explain what the np.unique function does, how the syntax works, and it will show you clear examples. If you need something specific, you can click on any of the following links. Table of Contents: Introduction Syntax Examples A Quick Introduction to Numpy … Read more

Numpy Factorial, Explained

In image showing how to compute factorials in Numpy and Scipy

In this tutorial, I’ll explain how to use the Numpy factorial function, AKA np.math.factorial. I’ll explain the syntax of np.math.factorial, how the function works, and how to use it. I’ll also show you how to use a different function, scipy.special.factorial, to compute factorials element-wise on Numpy arrays. Table of Contents: Introduction to Numpy Factorial The … Read more

Numpy Any, Explained

An image showing Numpy any operating on a Numpy array with boolean data, and testing if any of the values is True.

In this tutorial, I’ll explain how to use the Numpy any function (AKA, np.any). I’ll explain the what this function does, how the syntax works, and I’ll show you clear, step-by-step examples of how to use it. If you need something specific, just click on any of the following links. The link will take you … Read more

Numpy All, Explained

An image showing np.all testing if all elements are True.

In this tutorial, I’ll explain how to use the Numpy all function (AKA, np.all). I’ll explain the what this function does, how the syntax works, and I’ll show you clear, step-by-step examples of how to use it. If you need something specific, just click on any of the following links. The link will take you … Read more

How to Make a Seaborn Histogram

An image of a Python histogram, plotting normally distributed data.

This tutorial will show you how to make a Seaborn histogram with the sns.histplot function. I’ll explain the syntax of sns.histplot but also show you clear, step by step examples of how to make different kinds of histograms with Seaborn. The tutorial is divided up into several different sections. You can click on one of … Read more

np.random.rand Explained

An image that shows how np.random.rand generates numbers from the standard uniform distribution.

In this tutorial, I’ll show you how to use the np.random.rand function (AKA, Numpy random rand) to create Numpy arrays filled with random uniform numbers. I’ll explain exactly what this function does, how the syntax works, and I’ll show you step-by-step examples of how to use it. If you need something specific, you can click … Read more