What does the np.zeros() function do in NumPy?
Correct answer
A. Creates an array filled with zeros
15 views
A. Creates an array filled with zeros
15 views
The np.zeros() function is used to create an array filled with zeros of a specified shape. This is useful when you need to initialize an array with zeros before filling it with actual data. For example, np.zeros((3, 3)) creates a 3x3 array filled with zeros
Not sure why the answer is A? Ask here and get an explanation.