Skip to content

Commit 5db0215

Browse files
committed
CodeFactor suggestions
1 parent ee145a2 commit 5db0215

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rsatoolbox/inference/result.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ def get_errorbars(self, eb_type='sem', test_type='t-test'):
260260
ci_percent = float(eb_type[2:]) / 100
261261
ci = self.get_ci(ci_percent, test_type)
262262
means = self.get_means()
263-
errorbar_low = -(ci[0] - means)
264-
errorbar_high = (ci[1] - means)
263+
errorbar_low = means - ci[0]
264+
errorbar_high = ci[1] - means
265265
limits = np.concatenate((errorbar_low, errorbar_high))
266266
if np.isnan(limits).any() or (abs(limits) == np.inf).any():
267-
raise Exception(
267+
raise ValueError(
268268
'plot_model_comparison: Too few bootstrap samples for ' +
269269
'the requested confidence interval: ' + eb_type + '.')
270270
return (errorbar_low, errorbar_high)

0 commit comments

Comments
 (0)