Which function is used to calculate the dot product of two arrays?
Correct answer
A. np.dot()
13 views
A. np.dot()
13 views
np.dot() computes the dot product. For 1-D arrays it gives the inner product; for 2-D arrays it performs matrix multiplication, which can also be written with the @ operator.
np.multiply() is element-wise multiplication and np.cross() is the cross product.
For more solved questions like this one, see Data Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.