Numpy Ravel, Explained

An image that shows how Numpy ravel flattens a Numpy array.

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

A Quick Introduction to Numpy Random Normal

An image normally distributed data created with np.random.normal in Python.

This tutorial will cover the Numpy random normal function (AKA, np.random.normal). If you’re doing any sort of statistics or data science in Python, you’ll often need to work with random numbers. And in particular, you’ll often need to work with normally distributed numbers. The Numpy random normal function generates a sample of numbers drawn from … Read more

How to Use Numpy Argsort in Python

An image that shows how Numpy Argsort returns the index values that would sort a Numpy array.

This tutorial explains how to use the Numpy argsort function. It explains the syntax of np.argsort, and also shows clear examples. If you need help with something specific, you can click on any of these links. The links will take you to the appropriate part of the tutorial. Table of Contents: Introduction to Numpy Argsort … Read more

How to Make a Numpy Softmax Function

In this tutorial, I’ll show you how to define a Numpy softmax function in Python. I’ll explain what the softmax function is. And I’ll show you the syntax for how to define the softmax function using the Numpy package. Additionally, I’ll show you a few examples of how it works. If you need something specific, … Read more

How to Use the Numpy Maximum Function

An image that shows how the Numpy maximum function computes the element-wise maximum of two Numpy arrays.

In this tutorial, I’ll explain how to use the Numpy maximum function to compute the element-wise maxima of two Numpy arrays. I’ll explain the syntax of np.maximum, how the function works, and how to use it. If you need something specific, just click on any of the following links. Table of Contents: Introduction to Numpy … Read more

How to Use the Numpy Cos Function

An image that shows the cosine function, where the data was computed with Numpy cos and plotted with Plotly.

In this tutorial, I’ll show you how to use the Numpy cos function to compute the trigonometric cosine in Python. I’ll explain the syntax of np.cos, how the function works, and how to use it. If you need something specific, just click on any of the following links. Table of Contents: Introduction to Numpy Cos … Read more