Two numpy arrays are defined as follows: array_1 = np.array([[1, 2, 7], [3, 4, 8]]) array_2 = np.array([[1, 2], [3, 9], [4, 16]]) What would np.dot(array_1, array_2) return? Two numpy arrays are defined as follows: ```python array_1 = np.array([[1, 2, 7], [3, 4, 8]]) array_2 = np.array([[1, 2], [3, 9], [4, 16]]) ``` What would `np.dot(array_1, array_2)` return?

Respuesta :

fichoh

The dot product of two matrices, involves Multiplying the row of one matrix by the column of the other. The result of dot product of the two Numpy arrays is ;

  • array([[35, 132], [47, 170]])

The Numpy module is a library in python which is used for speedy numerical computation by reading data on vector - like format.

The code in python can be reproduced thus :

import numpy as np

#import the Numpy module and alias it as np

array_1 = np.array([[1, 2, 7], [3, 4, 8]])

#imput the values of the first array

array_2 = np.array([[1, 2], [3, 9], [4, 16]])

#imput the values of the second array

result = np.dot(array_1, array_2)

#attach the dot method, attach the dot product of both arrays to result.

result

#displays the result of the dot product

Therefore, the dot product of array_1 and array_2 in the question given above is array([[35, 132], [47, 170]])

Learn more :https://brainly.com/question/12907977

Ver imagen fichoh