1. Home
  2. Data Science
  3. NumPy
  4. Which NumPy function creates an array of zeros?

Added 16 Sep 2025

Which NumPy function creates an array of zeros?

  1. np.empty()
  2. np.zeros() Correct answer
  3. np.ones()
  4. np.array()

Correct answer

B. np.zeros()

18 views

MCQSEXAM

Explanation

np.zeros() creates a new array filled with zeros of specified shape and dtype.

Reference

Asked in: Data Science Exams

https://numpy.org/doc/stable/reference/generated/numpy.zeros.html

Preparing for an exam?

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