Question: Use Numpy Python Question: if the element in A1's first column is positive, show elements in A2 at the same row as that element What

Use Numpy Python

Question: if the element in A1's first column is positive, show elements in A2 at the same row as that element

What I have so far: (x1=A1, x2=A2)

import numpy as np

x1 = np.random.randint(low=-10,high=10,size=(5,4)

x1

output>>array([[-2, 5, 3, -2],

[ 1, 8, 1, -2],

[-3, -8, 7, 1],

[ 5, -5, -3, -7],

[-4, -6, 0, 1]])

x2=np.random.randint(10, size= (5, 4))

x2

output>> array([[3, 7, 6, 1],

[3, 5, 8, 4],

[6, 3, 9, 2],

[0, 4, 2, 4],

[1, 7, 8, 2]])

Expected Output: 3, 0

How do I approach this output? Help!

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!