MilesCranmer commited on
Commit
351f4f2
1 Parent(s): 76d478e

Copy instead of adjoint

Browse files
Files changed (1) hide show
  1. pysr/sr.py +1 -1
pysr/sr.py CHANGED
@@ -352,7 +352,7 @@ def _make_datasets_julia_str(X, X_filename, weights, weights_filename, y, y_file
352
  if weights is not None:
353
  np.savetxt(weights_filename, weights.reshape(-1, 1), delimiter=',')
354
  def_datasets += f"""
355
- X = convert(Array, readdlm("{_escape_filename(X_filename)}", ',', Float32, '\\n')')
356
  y = readdlm("{_escape_filename(y_filename)}", ',', Float32, '\\n')[:, 1]"""
357
  if weights is not None:
358
  def_datasets += f"""
 
352
  if weights is not None:
353
  np.savetxt(weights_filename, weights.reshape(-1, 1), delimiter=',')
354
  def_datasets += f"""
355
+ X = copy(transpose(readdlm("{_escape_filename(X_filename)}", ',', Float32, '\\n')))
356
  y = readdlm("{_escape_filename(y_filename)}", ',', Float32, '\\n')[:, 1]"""
357
  if weights is not None:
358
  def_datasets += f"""