Question: The following Python statements create a matrix A: import numpy as np a 1 = np . matrix ( ' 3 2 1 ' )

The following Python statements create a matrix A:
import numpy as np
a1= np.matrix('321')
a2= np.matrix(np.arange(0,1.1,.5))
a3= np.matrix(np.linspace(6,8,3))
A = np.vstack((a1,a2,a3))
Write out the resulting matrix.
Write two distinct Python commands to matrix multiply the second row by the third column of A. Confirm that these yield the same result, a scalar quantity.

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!