data type not understood

Try: Since the shape parameter has to be an int or sequence of ints http://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html Otherwise you are passing ncols to np.zeros as the dtype.

numpy matrix vector multiplication

Simplest solution Use numpy.dot or a.dot(b). See the documentation here. This occurs because numpy arrays are not matrices, and the standard operations *, +, -, / work element-wise on arrays. Note that while you can use numpy.matrix (as of early 2021) where * will be treated like standard matrix multiplication, numpy.matrix is deprecated and may … Read more

TypeError: unhashable type: ‘numpy.ndarray’

Your variable energies probably has the wrong shape: And that’s what happens if you read columnar data using your approach: Probably you can simply use instead. (P.S. Your code looks like it’s undecided about whether it’s data or elementdata. I’ve assumed it’s simply a typo.)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)