Which NumPy function is used to create an array of a specified shape where all…
2026
Which NumPy function is used to create an array of a specified shape where all elements are initialized to the value 0?
Answer: B. np.zeros()
- A.
np.empty()
- B.
np.zeros()
- C.
np.ones()
- D.
np.null()
Attempted by 211 students.
Show answer & explanation
Correct answer: B
Loading lesson…