From 53fa16dd70ed84219543fa655c09854157b9e2a7 Mon Sep 17 00:00:00 2001 From: mcDandy Date: Thu, 19 Feb 2026 22:34:59 +0100 Subject: [PATCH] Update UnifiedMathVisitor.py --- more_math/Parser/UnifiedMathVisitor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/more_math/Parser/UnifiedMathVisitor.py b/more_math/Parser/UnifiedMathVisitor.py index 4dd3960..1d17ae9 100644 --- a/more_math/Parser/UnifiedMathVisitor.py +++ b/more_math/Parser/UnifiedMathVisitor.py @@ -2779,9 +2779,10 @@ class UnifiedMathVisitor(MathExprVisitor): elif self._is_list(pad_val): pad = [int(x) for x in pad_val] else: - raise ValueError(f"{ctx.start.line}:{ctx.start.column}: Pad amount must be a list or tensor of integers") + raise ValueError(f"{ctx.start.line}:{ctx.start.column}: Pad amount must be a list or tensor.") + if len(pad) % 2 != 0: - raise ValueError(f"{ctx.start.line}:{ctx.start.column}: Pad amount list must have an even number of elements") + raise ValueError(f"{ctx.start.line}:{ctx.start.column}: Pad amount list must have an even number of elements.") reversed_pad = [] for i in range(len(pad) - 1, 0, -2):