From 81dca0b25bd6910512a064c1826ccddfc1bd1750 Mon Sep 17 00:00:00 2001 From: Hector Fernandes Date: Wed, 3 May 2023 14:34:34 +0000 Subject: [PATCH] fix: bug condition --- integration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration.py b/integration.py index a8c1ff8..02744eb 100644 --- a/integration.py +++ b/integration.py @@ -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] @@ -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]