From abf9c0dc4fc144cc3ea817875282ea9bdbe09862 Mon Sep 17 00:00:00 2001 From: GStechschulte Date: Fri, 15 Sep 2023 10:32:56 +0200 Subject: [PATCH] use set with in for conditional statement --- bambi/interpret/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bambi/interpret/utils.py b/bambi/interpret/utils.py index 86b4c6a12..85ec9bce2 100644 --- a/bambi/interpret/utils.py +++ b/bambi/interpret/utils.py @@ -341,7 +341,7 @@ def set_default_values(model: Model, data_dict: dict, kind: str) -> dict: dtype = str(model.data[name].dtype) if re.match(r"float*|int*", dtype): data_dict[name] = np.mean(model.data[name]) - elif dtype == "category" or dtype == "object": + elif dtype in ("category", "dtype"): data_dict[name] = mode(model.data[name]) if kind in ("comparisons", "slopes"):