Skip to content

Commit 41dd413

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8640d4d commit 41dd413

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

magpylib_force/force.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,4 +360,4 @@ def getFTdipole(sources, targets, anchor=None, eps=None):
360360
if anchor is not None:
361361
T -= np.cross(POSS[:,0]-anchor, F)
362362

363-
return np.array((F, -T))
363+
return np.array((F, -T))

tests/test_physics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ def test_physics_force_between_two_dipoles():
260260
r_abs = np.linalg.norm(r)
261261
r_unit = r / r_abs
262262
F_ana = 3*magpy.mu_0 / (4*np.pi*r_abs**4) * (
263-
np.cross(np.cross(r_unit, m1), m2) +
264-
np.cross(np.cross(r_unit, m2), m1) -
265-
2*r_unit*np.dot(m1, m2) +
263+
np.cross(np.cross(r_unit, m1), m2) +
264+
np.cross(np.cross(r_unit, m2), m1) -
265+
2*r_unit*np.dot(m1, m2) +
266266
5*r_unit*(np.dot(np.cross(r_unit, m1), np.cross(r_unit, m2)))
267267
)
268268

tests/test_self_consistency.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,4 +289,3 @@ def test_consistency_sphere_dipole():
289289
FT_dipole = getFT(src, dipole, anchor=(0,0,0))
290290

291291
np.testing.assert_allclose(FT_sphere, FT_dipole, rtol=1e-6, atol=1e-6)
292-

0 commit comments

Comments
 (0)