Numpy square root explained

This tutorial will cover the NumPy square root function, which is also called numpy.sqrt or np.sqrt. This is a fairly easy NumPy function to understand and use, but for the sake of helping true beginners, this tutorial will break everything down. I’ll quickly review NumPy, I’ll explain the syntax, and I’ll show you some examples. … Read more

How to Use Numpy Exponential

This tutorial will explain how to use the NumPy exponential function, which syntactically is called np.exp. This is a very simple function to understand, but it confuses many people because the documentation is a little confusing. It seems particularly confusing for beginners. With that in mind, this tutorial will carefully explain the numpy.exp function. We’ll … Read more

How to use NumPy hstack

In this tutorial, I’m going to show you how to use the NumPy hstack function, which is also called np.hstack or numpy.hstack. This is a very simple tool that we use to manipulate NumPy arrays. Specifically, we use np.hstack to combine NumPy arrays horizontally. The function “stacks” arrays in the horizontal direction. Again, this is … Read more

How to Use Numpy Random Choice

This tutorial will explain the NumPy random choice function which is sometimes called np.random.choice or numpy.random.choice. I recommend that you read the whole blog post, but if you want, you can skip ahead. Here are the contents of the tutorial … Contents: a quick review of NumPy why we use np.random.choice the syntax of NumPy … Read more

A quick guide to NumPy sort

This tutorial will show you how to use the NumPy sort method, which is sometimes called np.sort or numpy.sort. As the name implies, the NumPy sort technique enables you to sort NumPy arrays. So, this blog post will show you exactly how to use the technique to sort different kinds of arrays in Python. The … Read more

How to use the NumPy max function

This tutorial will show you how to use the NumPy max function, which you’ll see in Python code as np.max. At a high level, I want to explain the function and show you how it works. That being the case, there are two primary sections in this tutorial: the syntax of NumPy max, and examples … Read more

How to use the NumPy median function

This tutorial will show you how to use the NumPy median function, which we often call np.median. This tutorial will teach you a few things. First, it will show you how the NumPy median function works syntactically. We’ll cover the basic syntax and parameters of the np.median function. I’ll also show you some examples of … Read more

How to use the NumPy mean function

A visual representation of how NumPy mean computes the average of a NumPy array.

This tutorial will show you how to use the NumPy mean function, which you’ll often see in code as numpy.mean or np.mean. It will teach you how the NumPy mean function works at a high level and it will also show you some of the details. So, you’ll learn about the syntax of np.mean, including … Read more