课程: Python Functions for Data Science
今天就学习课程吧!
今天就开通帐号,24,100 门业界名师课程任您挑!
Minimum and maximum values in NumPy arrays - Python教程
课程: Python Functions for Data Science
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.
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
(已锁定)
Create NumPy arrays in Python5 分钟 30 秒
-
(已锁定)
Minimum and maximum values in NumPy arrays51 秒
-
Indices of min and max values in NumPy arrays1 分钟 4 秒
-
(已锁定)
Find shapes of NumPy arrays and reshape4 分钟 23 秒
-
(已锁定)
Select items or groups of items from NumPy arrays4 分钟 35 秒
-
(已锁定)
Arithmetic operations on NumPy arrays2 分钟 5 秒
-
(已锁定)
Scalar operations on NumPy arrays1 分钟 33 秒
-
(已锁定)
Statistical operations on NumPy arrays56 秒
-
(已锁定)
Other operations on NumPy arrays2 分钟 58 秒
-
(已锁定)
-
-
-
-
-