From 14f6d6aae8ab6da5c95331a2446ee841aeb00dca Mon Sep 17 00:00:00 2001 From: Furkan-rgb <50831308+Furkan-rgb@users.noreply.github.com> Date: Tue, 5 Nov 2024 08:10:12 +0000 Subject: [PATCH] Linting --- package/samplers/catcma/catcma.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package/samplers/catcma/catcma.py b/package/samplers/catcma/catcma.py index 0df7c3da..371ee9ea 100644 --- a/package/samplers/catcma/catcma.py +++ b/package/samplers/catcma/catcma.py @@ -201,7 +201,9 @@ def sample_relative( if len(solution_trials) >= popsize: # Calculate the number of categorical variables and maximum number of choices num_categorical_vars = len(categorical_search_space) - max_num_choices = max(len(space.choices) for space in categorical_search_space.values()) + max_num_choices = max( + len(space.choices) for space in categorical_search_space.values() + ) # Prepare solutions list solutions: List[Tuple[Tuple[np.ndarray, np.ndarray], float]] = [] @@ -212,7 +214,7 @@ def sample_relative( # Convert numerical parameters x = trans.transform({k: t.params[k] for k in numerical_search_space.keys()}) - + # Convert categorial values to one-hot vectors. # Example: # choices = ['a', 'b', 'c']