1. Home
  2. Data Science
  3. NumPy
  4. For 2-D NumPy arrays A and B, what does A @ B compute?

Added 2 Nov 2026

For 2-D NumPy arrays A and B, what does A @ B compute?

  1. Matrix transpose
  2. Element-wise multiplication
  3. Element-wise addition
  4. Matrix multiplication Correct answer

Correct answer

D. Matrix multiplication

22 views

MCQSEXAM

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

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More NumPy MCQs

Practise all NumPy MCQs

Similar MCQs