Question: Create the following 2-dimensional array in python `array([[ 1, 3, 5, 7], [ 9, 11, 13, 15], [17, 19, 21, 23], [25, 27, 29, 31],

Create the following 2-dimensional array in python

`array([[ 1, 3, 5, 7], [ 9, 11, 13, 15], [17, 19, 21, 23], [25, 27, 29, 31], [33, 35, 37, 39]])`

Create an array of strings as follows:

`array(['Paris', 'Shanghai', 'New York', 'London', 'Mumbai'])`

Create a boolean array from the above array where the city value is either `London` or `Shanghai`, and assign it to a variable called `mask`.

Use the boolean array created to subselect rows of the array in part (a).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!