Question: 2 . Create a 2 - dimensional NumPy array A 1 of shape ( 3 , 3 ) such that the first row should have

2.Create a 2-dimensional NumPy array A1 of shape (3,3) such that the first row should have the elements (1,2,4). The second row should have the elements (7,5,6). The third row should have the elements (9,4,11)
Create a 2-dimensional NumPy array A2 of shape (3,3) such that the first row should have the elements (4,5,1). The second row should have the elements (8,1,2). The third row should have the elements (7,3,2)
Create another NumPy array A3 which has a shape of 3x2 such that the first row should have the elements (3,1). The second row should have the elements (6,4). The third row should have the elements (2,5)(25 points)
o Compute an array which has the elements present in Z but not in A
o Compute an array with the sorted common elements that are present in Z and A
o Compute the sorted union of Z and A
o Compute a Boolean array indicating whether each element of Z is contained in A
o Find those elements which are either in Z or A, but not both arrays

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 Programming Questions!