Skip to content

Commit cd47438

Browse files
committed
update error msgs
1 parent a787f0a commit cd47438

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fooof/objs/fit.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ def fit(self, freqs=None, power_spectrum=None, freq_range=None):
446446
# Because FitError's are by default caught, this allows fitting to continue
447447
if not self._check_data:
448448
if np.any(np.isinf(self.power_spectrum)) or np.any(np.isnan(self.power_spectrum)):
449-
raise FitError("There are NaN or Inf values in the data, "
450-
"which preclude model fitting.")
449+
raise FitError("Model fitting was skipped because there are NaN or Inf "
450+
"values in the data, which preclude model fitting.")
451451

452452
# Fit the aperiodic component
453453
self.aperiodic_params_ = self._robust_ap_fit(self.freqs, self.power_spectrum)
@@ -816,7 +816,8 @@ def _robust_ap_fit(self, freqs, power_spectrum):
816816
raise FitError("Model fitting failed due to not finding "
817817
"parameters in the robust aperiodic fit.")
818818
except TypeError:
819-
raise FitError("Model fitting failed due to sub-sampling in the robust aperiodic fit.")
819+
raise FitError("Model fitting failed due to sub-sampling "
820+
"in the robust aperiodic fit.")
820821

821822
return aperiodic_params
822823

0 commit comments

Comments
 (0)