Skip to content

Commit

Permalink
trapz to trapezoid
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin CO committed Jul 15, 2024
1 parent 2330678 commit b00f99f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cocofest/fourier_approx.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def __init__(self):
def compute_real_fourier_coeffs(self, x, y, n):
result = []
for i in range(n + 1):
an = (2.0 / self.p) * spi.trapz(y * np.cos(2 * np.pi * i * x / self.p), x)
bn = (2.0 / self.p) * spi.trapz(y * np.sin(2 * np.pi * i * x / self.p), x)
an = (2.0 / self.p) * spi.trapezoid(y * np.cos(2 * np.pi * i * x / self.p), x)
bn = (2.0 / self.p) * spi.trapezoid(y * np.sin(2 * np.pi * i * x / self.p), x)
result.append((an, bn))
return np.array(result)

Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: cocofest
channels:
- conda-forge
dependencies:
- scipy = 1.13.0
- biorbd
- bioviz
- python-graphviz
Expand Down

0 comments on commit b00f99f

Please sign in to comment.