Skip to content

Commit 37e0ad5

Browse files
authored
Merge branch 'master' into clean_notebooks
2 parents d5047ca + e778b80 commit 37e0ad5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ema_workbench/analysis/parcoords.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_limits(data):
114114
"""
115115

116116
def limits(x):
117-
if x.dtype == "object":
117+
if x.dtype == "object" or x.dtype == "str":
118118
return pd.Series([set(x), set(x)])
119119
else:
120120
return pd.Series([x.min(), x.max()])
@@ -189,7 +189,7 @@ def __init__(self, limits, formatter=None, fontsize=14, rot=90):
189189

190190
# recode data
191191
for column, dtype in limits.dtypes.items():
192-
if dtype == "object":
192+
if dtype == "object" or dtype == "str":
193193
cats = limits[column][0]
194194
self.recoding[column] = CategoricalDtype(categories=cats, ordered=False)
195195
self.limits.loc[:, column] = [0, len(cats) - 1]

ema_workbench/examples/models/pysd/Teacup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"initial_time": lambda: 0,
2424
"final_time": lambda: 30,
2525
"time_step": lambda: 0.125,
26-
"saveper": lambda: time_step(),
26+
"saveper": lambda: time_step(), # noqa: PLW0108
2727
}
2828

2929

0 commit comments

Comments
 (0)