Unverified Commit 5ff2f8fc authored by Ignacio Pickering's avatar Ignacio Pickering Committed by GitHub
Browse files

provide better error message (#550)

parent 656aa037
......@@ -188,6 +188,9 @@ class Transformations:
X.append([1] * n)
X = numpy.array(X).transpose()
Y = numpy.array(Y)
if Y.shape[0] == 0:
raise RuntimeError("subtract_self_energies could not find any energies in the provided dataset.\n"
"Please make sure the path provided to data.load() points to a dataset has energies and is not empty or corrupted.")
sae, _, _, _ = numpy.linalg.lstsq(X, Y, rcond=None)
sae_ = sae
if shifter.fit_intercept:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment