Numpy ndarray multiplication switching to matrix multiplication
问题 This is the error I am getting: File "/data/eduardoj/linear.py", line 305, in _fit_model de_dl = (dl_dt + de_dt) * dt_dl File "/data/eduardoj/MSc-env/lib/python3.4/site-packages/numpy/matrixlib/defmatrix.py", line 343, in __mul__ return N.dot(self, asmatrix(other)) ValueError: shapes (1,53097) and (1,53097) not aligned: 53097 (dim 1) != 1 (dim 0) And this is the piece of code of numpy where it is crashing: 340 def __mul__(self, other): >* 341 if isinstance(other, (N.ndarray, list, tuple)) :