Skip to content

Commit 1b163c2

Browse files
authored
Merge pull request #1 from devhector/main
fix: bug condition
2 parents eb39674 + aa10ba2 commit 1b163c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

integration.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def simpson_array(x, y):
6565
Returns:
6666
xi (float): numerical approximation of the definite integral.
6767
"""
68-
if y.size != y.size:
68+
if x.size != y.size:
6969
raise ValueError("'x' and 'y' must have same size.")
7070

7171
h = x[1] - x[0]
@@ -94,7 +94,7 @@ def trapezoidal_array(x, y):
9494
Returns:
9595
xi (float): numerical approximation of the definite integral.
9696
"""
97-
if y.size != y.size:
97+
if x.size != y.size:
9898
raise ValueError("'x' and 'y' must have same size.")
9999

100100
h = x[1] - x[0]

0 commit comments

Comments
 (0)