Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/roguewave/tools/time_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
array,
zeros,
linspace,
trapz,
trapezoid,
)
from numpy.typing import NDArray

Expand Down Expand Up @@ -326,6 +326,6 @@ def integrated_response_factor_spectral_tail(
else:
spectrum[index] = integration_frequencies[index] ** tail_power

return trapz(spectrum, integration_frequencies) / trapz(
return trapezoid(spectrum, integration_frequencies) / trapezoid(
abs(complex_amplification_factor) ** 2 * spectrum, integration_frequencies
)
4 changes: 2 additions & 2 deletions src/roguewave/wavephysics/balance/jb23_tail_stress.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
zeros,
concatenate,
min,
trapz,
trapezoid,
)

from roguewave.wavephysics.balance.solvers import numba_newton_raphson
Expand Down Expand Up @@ -139,7 +139,7 @@ def tail_stress_parametrization_jb23(
wavenumbers, roughness_length, friction_velocity, tail_spectrum, parameters
)
integral = (
trapz(stress, wavenumbers) + background_stress * parameters["air_density"]
trapezoid(stress, wavenumbers) + background_stress * parameters["air_density"]
)

eastward_stress = integral * stress_east_fac
Expand Down
2 changes: 1 addition & 1 deletion src/roguewave/wavespectra/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ def _spectral_weighted(self, property: DataArray, fmin=0, fmax=numpy.inf):
range = {NAME_F: self._range(fmin, fmax)}

property = property.fillna(0)
return numpy.trapz(
return numpy.trapezoid(
property.isel(**range) * self.e.isel(**range), self.frequency[range]
) / self.m0(fmin, fmax)

Expand Down