Skip to content

Commit

Permalink
Merge pull request #1 from devhector/main
Browse files Browse the repository at this point in the history
fix: bug condition
  • Loading branch information
cfgnunes committed May 3, 2023
2 parents b2b2487 + 81dca0b commit d3fc568
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 d3fc568

Please sign in to comment.