From 83453ca0d27dbaba31bd75a3f21f0f5cc5099131 Mon Sep 17 00:00:00 2001 From: Per A Brodtkorb Date: Tue, 22 Nov 2016 10:01:36 +0100 Subject: [PATCH] Simplified out of bound check in mctp2tc --- wafo/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wafo/misc.py b/wafo/misc.py index dfe110d..5799f4e 100644 --- a/wafo/misc.py +++ b/wafo/misc.py @@ -1337,7 +1337,7 @@ def mctp2tc(f_Mm, utc, param, f_mM=None): raise IndexError('index for mean-level out of range, stop') def _check_discretization(param, ntc): - if param[2] - 1 < ntc or ntc < 2: + if not (1 < ntc < param[2]): raise ValueError('the reference level out of range, stop') def _normalize_rows(arr):