From 30580165a9ed01a7ff09d4fab4fb804b663b5194 Mon Sep 17 00:00:00 2001 From: Pablo Zubieta <8410335+pabloferz@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:25:50 -0500 Subject: [PATCH] Make it black complaint --- pysages/utils/__init__.py | 11 ++++++++++- pysages/utils/core.py | 2 -- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pysages/utils/__init__.py b/pysages/utils/__init__.py index f87d403f..ffde6466 100644 --- a/pysages/utils/__init__.py +++ b/pysages/utils/__init__.py @@ -18,5 +18,14 @@ solve_pos_def, try_import, ) -from .core import ToCPU, copy, dispatch, eps, first_or_all, gaussian, identity, linear_solver +from .core import ( + ToCPU, + copy, + dispatch, + eps, + first_or_all, + gaussian, + identity, + linear_solver, +) from .transformations import quaternion_from_euler, quaternion_matrix diff --git a/pysages/utils/core.py b/pysages/utils/core.py index 25e2a2d1..20fe0f3e 100644 --- a/pysages/utils/core.py +++ b/pysages/utils/core.py @@ -80,13 +80,11 @@ def linear_solver(use_pinv: bool): (this is computationally more expensive but numerically more stable). """ if use_pinv: - # This is numerically more robust def tsolve(A, B): return np.linalg.pinv(A.T) @ B else: - # Another option to benchmark against is `linalg.tensorsolve(A @ A.T, A @ B)` def tsolve(A, B): return solve_pos_def(A @ A.T, A @ B)