For 2-D NumPy arrays A and B, what does A @ B compute?
-
A
Matrix transpose
-
B
Element-wise multiplication
-
C
Element-wise addition
-
D
Matrix multiplication
Correct answer
Correct answer
D. Matrix multiplication
22 views
Explanation
The @ operator (Python 3.5+) performs matrix multiplication like np.matmul, whereas A * B multiplies element by element.
Reference
Asked in: Data Science Interviews
Doubts & discussion
Not sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ