From 611d3b1aebca72e2e38347d2a8aadd39691e2346 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 13:16:59 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/python/test_taichi_cg.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/python/test_taichi_cg.py b/tests/python/test_taichi_cg.py index 618bac75afac8..4466aba4b4681 100644 --- a/tests/python/test_taichi_cg.py +++ b/tests/python/test_taichi_cg.py @@ -1,7 +1,9 @@ -import taichi as ti import math + import pytest -from taichi.linalg import taichi_cg_solver, LinearOperator +from taichi.linalg import LinearOperator, taichi_cg_solver + +import taichi as ti from tests import test_utils @@ -28,7 +30,7 @@ def compute_Ax(v: ti.template(), mv: ti.template()): r = v[i + 1, j] if i + 1 <= GRID - 1 else 0.0 t = v[i, j + 1] if j + 1 <= GRID - 1 else 0.0 b = v[i, j - 1] if j - 1 >= 0 else 0.0 - # Avoid ill-conditioned matrix A + # Avoid ill-conditioned matrix A mv[i, j] = 20 * v[i, j] - l - r - t - b @ti.kernel