From 7fa00120385d89ab472ea7b53d7cee562e40f526 Mon Sep 17 00:00:00 2001 From: Marcel Robeer Date: Wed, 12 May 2021 21:57:45 +0200 Subject: [PATCH] Flake8 fix --- contrastive_explanation/domain_mappers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrastive_explanation/domain_mappers.py b/contrastive_explanation/domain_mappers.py index 543f4b7..8172537 100644 --- a/contrastive_explanation/domain_mappers.py +++ b/contrastive_explanation/domain_mappers.py @@ -308,7 +308,8 @@ def apply_encode(self, data): if one_instance: # Single instance data = data.reshape(1, -1) - x = [self.encoders[i].transform(column).toarray() if i in self.categorical_features + x = [self.encoders[i].transform(column).toarray() + if i in self.categorical_features else column.reshape(-1, 1) for i, column in enumerate(data.T)] if one_instance: