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 Aug 28, 2024
1 parent d1e788e commit e4321bb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_isotropic_anisotropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ def test_negative_susceptibility():

cells = 1000 # should be >=1000, otherwise discretization error too large

magnet = magpy.magnet.Cuboid(dimension=(1e-3, 1e-3, 1e-3), polarization=(0, 0, -0.1))
magnet = magpy.magnet.Cuboid(
dimension=(1e-3, 1e-3, 1e-3), polarization=(0, 0, -0.1)
)
grid = np.loadtxt("tests/testdata/grid_points.pts")
field_ansys = np.loadtxt("tests/testdata/negative_susceptibility_ansys.txt", skiprows=1)
field_ansys = np.loadtxt(
"tests/testdata/negative_susceptibility_ansys.txt", skiprows=1
)
field_ansys = field_ansys[:, 3:]

# isotropic
Expand All @@ -61,4 +65,4 @@ def test_negative_susceptibility():

field_magpylib = magnet_meshed.getB(grid)

np.testing.assert_allclose(field_ansys, field_magpylib, rtol=0, atol=0.0065)
np.testing.assert_allclose(field_ansys, field_magpylib, rtol=0, atol=0.0065)

0 comments on commit e4321bb

Please sign in to comment.