that is the whole error.
you give OpenCV a numpy array of doubles when it does not want that.
make sure your data is FP32 (single precision float) or some other type. do that when the data is created, or use numpy’s yourarray.astype(np.float32)
to convert