How to initialize 2D numpy array with zeros in Python

1 Answer

0 votes
import numpy as np

arr = np.zeros((3, 2))
 
print(arr)
 
  
 
'''
run:
 
[[0. 0.]
 [0. 0.]
 [0. 0.]]
 
'''

 



answered Jan 27, 2020 by avibootz

Related questions

...