1. Home
  2. Data Science
  3. NumPy
  4. What does the np.histogram() function in NumPy do?

Added 24 Feb 2024

What does the np.histogram() function in NumPy do?

  1. Computes the histogram of a set of data Correct answer
  2. Computes the mean of a set of data
  3. Computes the standard deviation of a set of data
  4. Computes the median of a set of data

Correct answer

A. Computes the histogram of a set of data

14 views

MCQSEXAM

Explanation

np.histogram() computes the histogram of a dataset: it returns the count of values in each bin together with the bin edges. It does not draw anything — plotting is done with Matplotlib's plt.hist().

Want more practice? Try the full set of Data Science MCQs on MCQsExam.com.

Doubts & discussion

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