Skip to content

Commit aa10ba2

Browse files
committed
fix: bug condition
1 parent eb39674 commit aa10ba2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

integration.py

Lines changed: 2 additions & 2 deletions
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)