Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 23)
23.
What does the function numpy.zeros_like(arr) do in NumPy?
Creates a new array with zeros of the same shape as arr.
Fills the existing array arr with zeros.
Checks if all elements in arr are zero.
Reshapes arr to have all zero elements.
Answer: Option
Explanation:
The numpy.zeros_like() function creates a new array with zeros of the same shape as the input array arr.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.