Articles → NUMPY → Arrays Of Zero In NumpyArrays Of Zero In NumpyIn this article, we will discuss the "zeros" method in NumPy.Purpose The "zeros" method returns an array of a specific size that is filled with zeros.Example In this example, we will create a one-dimensional and two-dimensional array. import numpy as np print(np.zeros(5)) # Single dimensional arrayClick to Enlargeimport numpy as np print(np.zeros((5, 5))) # Two dimensional arrayClick to EnlargePosted By - Karan Gupta Posted On - Monday, March 18, 2019 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
import numpy as np print(np.zeros(5)) # Single dimensional array
import numpy as np print(np.zeros((5, 5))) # Two dimensional array
Query/Feedback