np zeros data type not understood

Solutions on MaxInterview for np zeros data type not understood by the best coders in the world

showing results for - "np zeros data type not understood"
Paul
27 Oct 2018
1mmatrix = np.zeros((nrows, ncols))
Kenzo
18 Feb 2020
1import numpy as np
2dim = 3 # number of entries
3shp = (dim, 1) # shape tuple
4x = np.zeros(shp) # second argument 'dtype' is not used, default is 'float'
5print(x)