From 3230d1dc70358876380d5b5f482b242cf109687b Mon Sep 17 00:00:00 2001 From: Matthieu Schaller Date: Sat, 10 Aug 2024 18:09:28 +0200 Subject: [PATCH] Applied formatting tool --- .../emulators/multi_gaussian_process.py | 16 ++++++++++------ swiftemulator/io/swift.py | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/swiftemulator/emulators/multi_gaussian_process.py b/swiftemulator/emulators/multi_gaussian_process.py index 2b5f45e..3802a4f 100644 --- a/swiftemulator/emulators/multi_gaussian_process.py +++ b/swiftemulator/emulators/multi_gaussian_process.py @@ -231,12 +231,16 @@ def predict_values( for index, (low, high) in enumerate(self.independent_regions): mask = np.logical_and( - independent > low - if low is not None - else np.ones_like(independent).astype(bool), - independent < high - if high is not None - else np.ones_like(independent).astype(bool), + ( + independent > low + if low is not None + else np.ones_like(independent).astype(bool) + ), + ( + independent < high + if high is not None + else np.ones_like(independent).astype(bool) + ), ) predicted, errors = self.emulators[index].predict_values( diff --git a/swiftemulator/io/swift.py b/swiftemulator/io/swift.py index e9b3247..8429525 100644 --- a/swiftemulator/io/swift.py +++ b/swiftemulator/io/swift.py @@ -103,8 +103,8 @@ def load_pipeline_outputs( "adaptive_mass_function", "histogram", ] - recursive_search = ( - lambda d, k: d.get(k[0], recursive_search(d, k[1:])) if len(k) > 0 else None + recursive_search = lambda d, k: ( + d.get(k[0], recursive_search(d, k[1:])) if len(k) > 0 else None ) line_search = lambda d: recursive_search(d, line_types)