Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 19, 2023
1 parent 5f6f67a commit 7e7f693
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adaptive/learner/average_learner1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def _ask_for_new_point(self, n: int) -> tuple[Points, list[float]]:
new point, since in general n << min_samples and this point will need
to be resampled many more times"""
points, (loss_improvement,) = self._ask_points_without_adding(1)
seed_points = [(seed, x) for seed, x in zip(range(n), n * points)]
seed_points = list(zip(range(n), n * points))
loss_improvements = [loss_improvement / n] * n
return seed_points, loss_improvements # type: ignore[return-value]

Expand Down
2 changes: 1 addition & 1 deletion adaptive/learner/learner1D.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def triangle_loss(xs: XsType1, ys: YsType1) -> Float:
pts = [(x, *y) for x, y in zip(xs, ys)] # type: ignore[misc]
vol = simplex_volume_in_embedding
else:
pts = [(x, y) for x, y in zip(xs, ys)]
pts = list(zip(xs, ys))
vol = volume
return sum(vol(pts[i : i + 3]) for i in range(N)) / N

Expand Down

0 comments on commit 7e7f693

Please sign in to comment.