From the course: Python Functions for Data Science
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Other operations on NumPy arrays - Python Tutorial
From the course: Python Functions for Data Science
Other operations on NumPy arrays
- [Woman] There are several other operations that can be performed on numpy arrays. I'll be walking through some examples to show you more numpy functions that are helpful when working with numerical data. First, I'm initializing a variable named array A as a one dimension numpy array contained the integer zero to five inclusive. Let's say I want to compute the square of each item in array A. Thereby creating a new numpy array. To do this, I can call numpy square function and pass an array A. It would look like this. Now I'm initializing a variable named array B as a one dimension numpy array as shown here. Say I want to compute the square root of each item in array B. Thereby creating a new numpy array. I can call numpy's SQRT function and pass an array B. It would look like this. Next, I want to compute the exponential of each item in array A. Thereby creating a new numpy array. I can call numpy's EXP function…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Create NumPy arrays in Python5m 30s
-
(Locked)
Minimum and maximum values in NumPy arrays51s
-
Indices of min and max values in NumPy arrays1m 4s
-
(Locked)
Find shapes of NumPy arrays and reshape4m 23s
-
(Locked)
Select items or groups of items from NumPy arrays4m 35s
-
(Locked)
Arithmetic operations on NumPy arrays2m 5s
-
(Locked)
Scalar operations on NumPy arrays1m 33s
-
(Locked)
Statistical operations on NumPy arrays56s
-
(Locked)
Other operations on NumPy arrays2m 58s
-
(Locked)
-
-
-
-
-