Skip to content

Commit 8660486

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 95cf36e commit 8660486

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

adaptive/learner/learnerND.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,9 @@ def _is_known_point(self, point):
569569
]
570570

571571
def _close(other):
572-
return all(abs(a - b) <= tol for (a, b, tol) in zip(point, other, tolerances))
572+
return all(
573+
abs(a - b) <= tol for (a, b, tol) in zip(point, other, tolerances)
574+
)
573575

574576
for existing in self.data.keys():
575577
if _close(existing):

adaptive/tests/unit/test_learnernd_integration.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import math
22

3-
import pytest
43
import numpy as np
4+
import pytest
55
from scipy.spatial import ConvexHull
66

77
from adaptive.learner import LearnerND
@@ -60,9 +60,10 @@ def test_learnerND_log_works():
6060

6161
@pytest.mark.skipif(not with_pandas, reason="pandas is not installed")
6262
def test_learnerND_resume_after_loading_dataframe_convex_hull(monkeypatch):
63-
import pandas
6463
from types import MethodType
6564

65+
import pandas
66+
6667
hull_points = [
6768
(4.375872112626925, 8.917730007820797),
6869
(4.236547993389047, 6.458941130666561),
@@ -98,7 +99,9 @@ def some_f(xy):
9899

99100
def old_ask_bound_point(self):
100101
new_point = next(
101-
p for p in self._bounds_points if p not in self.data and p not in self.pending_points
102+
p
103+
for p in self._bounds_points
104+
if p not in self.data and p not in self.pending_points
102105
)
103106
self.tell_pending(new_point)
104107
return new_point, np.inf

0 commit comments

Comments
 (0)