Skip to content

Commit

Permalink
fix: bug condition
Browse files Browse the repository at this point in the history
  • Loading branch information
devhector committed May 3, 2023
1 parent b2b2487 commit 81dca0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def simpson_array(x, y):
Returns:
xi (float): numerical approximation of the definite integral.
"""
if y.size != y.size:
if x.size != y.size:
raise ValueError("'x' and 'y' must have same size.")

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

h = x[1] - x[0]
Expand Down

0 comments on commit 81dca0b

Please sign in to comment.