I am trying to use a matrix to calculate material. Code is
import numpy as np # some code mmatrix = np.zeros(nrows, ncols) print mmatrix[0, 0]
but I get the "data type incomprehensible" and it works if I do it from the terminal.
Try:
mmatrix = np.zeros((nrows, ncols))
Because the form parameter must be an int or sequence of ints
http://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html
Otherwise, you pass ncols to np.zeros as dtype.
ncols
np.zeros