1. Home
  2. Data Science
  3. NumPy
  4. Which function is used to find the maximum value in an…

Added 24 Feb 2024

Which function is used to find the maximum value in an array?

  1. max()
  2. maximum()
  3. np.max() Correct answer
  4. np.maximum()

Correct answer

C. np.max()

13 views

MCQSEXAM

Explanation

np.max() returns the largest value in an array and accepts an axis argument for row-wise or column-wise maxima.

Do not confuse it with np.maximum(), which compares two arrays element by element. The array method arr.max() is equivalent.

Practise more Data Science MCQs with answers and explanations on MCQsExam.com.

Doubts & discussion

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