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

Other operations on NumPy arrays - Python Tutorial

From the course: Python Functions for Data Science

Start my 1-month free trial

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…

Contents