Skip to content

Commit

Permalink
Testing with backend, lockfile ok?
Browse files Browse the repository at this point in the history
  • Loading branch information
daquinteroflex committed Aug 30, 2024
1 parent b18e169 commit 1c319e8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tidy3d/components/field_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 1c319e8

Please sign in to comment.