Do you mean replacing `safe_asarray(X, dtype=np.float64)` by `np.array(X, copy=copy, , dtype=np.float64)` and removing the line I added?