I’m trying to use a matrix to compute stuff. The code is this
import numpy as np # some code mmatrix = np.zeros(nrows, ncols) print mmatrix[0, 0]
but I get ‘data type not understood’, and it works if I do it from terminal.
mmatrix = np.zeros((nrows, ncols))
Since the shape parameter has to be an int or sequence of ints
Otherwise you are passing
np.zeros as the dtype.