Skip to content

Commit

Permalink
FIX error='ci'
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbrodbeck committed Nov 23, 2021
1 parent 72f4425 commit ec5f062
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eelbrain/_stats/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ class DispersionSpec:
def from_string(cls, string: Union[str, 'DispersionSpec']):
if isinstance(string, cls):
return string
m = re.match(r"^([.\d]*)(\%?)(CI|SEM)$", string.upper())
m = re.match(r"^([.\d]*)(%?)(CI|SEM)$", string.upper())
if m is None:
raise ValueError(f"{string!r}: invalid dispersion specification")
multiplier, perc, measure = m.groups()
if multiplier:
multiplier = float(multiplier)
if perc:
multiplier /= 100
elif measure == 'ci':
elif measure == 'CI':
multiplier = .95
else:
multiplier = 1
Expand Down

0 comments on commit ec5f062

Please sign in to comment.