From the course: Python Functions for Data Science

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Minimum and maximum values in NumPy arrays

Minimum and maximum values in NumPy arrays - Python Tutorial

From the course: Python Functions for Data Science

Start my 1-month free trial

Minimum and maximum values in NumPy arrays

- [Instructor] When working with Numpy arrays, the min and max functions that are specific to Numpy arrays can come in handy. For example, let's say that I have a variable named array_random containing a Numpy array of 20 random integers from one to 50. To find the minimum value in this Numpy array, I can call the min function on array_random. It would look like this. I'll go ahead and run this cell. As you can see three is the minimum value. Now to find the maximum value in array_random, I can call the max function on array_random. It would look like this. I'll go ahead and run this cell. As you can see, 45 is the maximum value. Now that you've seen how the min and max function specific to Numpy arrays work, you can start using them when you need to find the minimum and maximum values in your data.

Contents