From 7e7f693a64b6ed13ab3bfd0d1cf47f42d7600b38 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 10:30:39 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- adaptive/learner/average_learner1D.py | 2 +- adaptive/learner/learner1D.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adaptive/learner/average_learner1D.py b/adaptive/learner/average_learner1D.py index 12c7c9a6c..9678b4f64 100644 --- a/adaptive/learner/average_learner1D.py +++ b/adaptive/learner/average_learner1D.py @@ -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] diff --git a/adaptive/learner/learner1D.py b/adaptive/learner/learner1D.py index 8385e67b8..a1c143af4 100644 --- a/adaptive/learner/learner1D.py +++ b/adaptive/learner/learner1D.py @@ -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