From c20c2ad3dc7658bb025496676d75e5f66add073f Mon Sep 17 00:00:00 2001 From: dschwoerer Date: Mon, 14 Oct 2024 08:30:56 +0000 Subject: [PATCH] Apply black/isort changes --- zoidberg/__init__.py | 3 +-- zoidberg/field.py | 17 ++--------------- zoidberg/poloidal_grid.py | 6 +++--- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/zoidberg/__init__.py b/zoidberg/__init__.py index cc9e5af..88884c8 100644 --- a/zoidberg/__init__.py +++ b/zoidberg/__init__.py @@ -9,8 +9,7 @@ __version__ = get_version(root="..", relative_to=__file__) -from . import zoidberg -from . import field, fieldtracer, grid, plot +from . import field, fieldtracer, grid, plot, zoidberg from .zoidberg import make_maps, write_maps __all__ = [ diff --git a/zoidberg/field.py b/zoidberg/field.py index e002be6..5964b79 100644 --- a/zoidberg/field.py +++ b/zoidberg/field.py @@ -316,21 +316,8 @@ def Rfunc(self, x, z, phi): try: - from sympy import ( - And, - Piecewise, - Sum, - Symbol, - atan2, - cos, - diff, - factorial, - lambdify, - log, - pi, - sin, - sqrt, - ) + from sympy import (And, Piecewise, Sum, Symbol, atan2, cos, diff, + factorial, lambdify, log, pi, sin, sqrt) class StraightStellarator(MagneticField): """A "rotating ellipse" stellarator without curvature diff --git a/zoidberg/poloidal_grid.py b/zoidberg/poloidal_grid.py index 7999722..2114c00 100644 --- a/zoidberg/poloidal_grid.py +++ b/zoidberg/poloidal_grid.py @@ -383,9 +383,9 @@ def findIndex(self, R, Z, tol=1e-10, show=False): # Create a mask for the positions mask = np.ones(xind.shape) - mask[ - np.logical_or((xind < 0.5), (xind > (nx - 1.5))) - ] = 0.0 # Set to zero if near the boundary + mask[np.logical_or((xind < 0.5), (xind > (nx - 1.5)))] = ( + 0.0 # Set to zero if near the boundary + ) if show and plotting_available: plt.plot(self.R, self.Z, ".")