From 1c319e81bea398ad9ad30d3a054bffe8c7d9ae08 Mon Sep 17 00:00:00 2001 From: daquinteroflex Date: Fri, 30 Aug 2024 21:53:48 +0200 Subject: [PATCH] Testing with backend, lockfile ok? --- tidy3d/components/field_projection.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tidy3d/components/field_projection.py b/tidy3d/components/field_projection.py index dcb61bca3..d2843fb7a 100644 --- a/tidy3d/components/field_projection.py +++ b/tidy3d/components/field_projection.py @@ -371,9 +371,15 @@ def integrate_2d( ): """Trapezoidal integration in two dimensions.""" if get_numpy_major_version() == "2": - integration = np.trapezoid(np.trapezoid(np.squeeze(function) * phase, pts_u, axis=0), pts_v, axis=0) # noqa: NPY201 + integration = np.trapezoid( + np.trapezoid(np.squeeze(function) * phase, pts_u, axis=0), pts_v, axis=0 + ) # noqa: NPY201 else: - integration = np.trapz(np.trapz(np.squeeze(function) * phase, pts_u, axis=0), pts_v, axis=0) # noqa: NPY201 + integration = np.trapz( # noqa: NPY201 + np.trapz(np.squeeze(function) * phase, pts_u, axis=0), # noqa: NPY201 + pts_v, + axis=0, # noqa: NPY201 + ) # noqa: NPY201 return integration def _far_fields_for_surface(