1. Home
  2. Data Science
  3. NumPy
  4. Which function is used to perform element-wise…

Added 25 Feb 2024

Which function is used to perform element-wise multiplication of two arrays in NumPy?

  1. np.dot()
  2. np.multiply() Correct answer
  3. np.matmul()
  4. np.cross()

Correct answer

B. np.multiply()

16 views

MCQSEXAM

Explanation

The np.multiply() function performs element-wise multiplication of two arrays. It multiplies corresponding elements of the input arrays to produce a new array containing the result of the multiplication.

Reference

https://www.w3schools.com/python/numpy/numpy_creating_arrays.asp

Doubts & discussion

Not sure why the answer is B? 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