aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-03-03 01:09:53 +0100
committerNao Pross <np@0hm.ch>2024-03-03 01:09:53 +0100
commit2c29ce8d19405c32d0a4846538a9facc1f766009 (patch)
treed209c9816c2cc17ca4d739ebb458782bbaba27bc
parentAdd representation of basic algebraic operations (diff)
downloadmdpoly-2c29ce8d19405c32d0a4846538a9facc1f766009.tar.gz
mdpoly-2c29ce8d19405c32d0a4846538a9facc1f766009.zip
Fix PolyIndex.is_constant
Diffstat (limited to '')
-rw-r--r--mdpoly/types.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/mdpoly/types.py b/mdpoly/types.py
index 4b75e8f..a8ffd90 100644
--- a/mdpoly/types.py
+++ b/mdpoly/types.py
@@ -146,8 +146,7 @@ class PolyIndex(tuple[PolyVarIndex]):
def is_constant(index: Self) -> bool:
""" Check if is index of a constant term """
if len(index) != 1:
- # FIXME: error message
- raise IndexError(f"{index}")
+ return False
return PolyVarIndex.is_constant(index[0])