Skip to content

Commit

Permalink
Applied formatting tool
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuSchaller committed Aug 10, 2024
1 parent 116affc commit 3230d1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions swiftemulator/emulators/multi_gaussian_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions swiftemulator/io/swift.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3230d1d

Please sign in to comment.