Skip to content

Commit a5c26cd

Browse files
committed
fix issue in python>=3.12
1 parent ce78091 commit a5c26cd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

pytim/observables/contactangle.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,7 @@ def _ellipse_general_to_canonical(coeffs, check_coeffs=True):
850850
phi += np.pi/2.
851851
# NOTE: don't change the units of phi to deg., other parts of the code
852852
# depend on it being in rad.
853+
phi = np.real_if_close(phi, tol=1000)
853854
phi = phi % np.pi
854855
return {'x0': x0.item(), 'y0': y0.item(), 'a': ap.item(), 'b': bp.item(), 'phi': phi.item(), 'e': e.item()}
855856

0 commit comments

Comments
 (0)