Skip to content

Commit

Permalink
fix for slow TravalParameters load
Browse files Browse the repository at this point in the history
typo
  • Loading branch information
dbrakenhoff committed Nov 8, 2022
1 parent 681092a commit 2cc8570
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions traval/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def from_csv(cls, csvfile):
TravalParameters
"""
params = pd.read_csv(csvfile, index_col=[0, 1, 2])
params.sort_index(inplace=True)
for i, (v, t) in params.loc[:, ["value", "dtype"]].iterrows():
if t == "float":
v = float(v)
Expand Down
2 changes: 1 addition & 1 deletion traval/rulelib.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def rule_pastas_outside_pi(

# apply minimum ci if passed
if min_ci is not None:
# check if mean of current interval is smalller than ci
# check if mean of current interval is smaller than ci
if (upper - lower).mean() < min_ci:
# adjust bounds with half of min_ci each
upper = upper + min_ci / 2.0
Expand Down
2 changes: 1 addition & 1 deletion traval/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4b.0"
__version__ = "0.3.1"

0 comments on commit 2cc8570

Please sign in to comment.