How to create a matrix (2D array) of zeros using NumPy in Python

1 Answer

0 votes
import numpy as np

arr = np.zeros((3, 4))

print(arr)



'''
run:

[[0. 0. 0. 0.]
 [0. 0. 0. 0.]
 [0. 0. 0. 0.]]

'''

 



answered Mar 10, 2023 by avibootz
...