summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-05-03 11:34:32 +0200
committerNao Pross <np@0hm.ch>2024-05-03 11:34:32 +0200
commitb3e7cb1a62f09e475b35a67d9bac5d13ff22e965 (patch)
treefb440886fd4f7d38b3414d752d467cbd163a4e52
parentFix incorrect implementation of VariableExpression (diff)
downloadpolymatrix-b3e7cb1a62f09e475b35a67d9bac5d13ff22e965.tar.gz
polymatrix-b3e7cb1a62f09e475b35a67d9bac5d13ff22e965.zip
Remove __hash__ dunder hack, the user has to manually unwrap
Diffstat (limited to '')
-rw-r--r--polymatrix/expression/expression.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/polymatrix/expression/expression.py b/polymatrix/expression/expression.py
index a7e2025..edb0830 100644
--- a/polymatrix/expression/expression.py
+++ b/polymatrix/expression/expression.py
@@ -526,9 +526,9 @@ class VariableExpression(Expression, Variable):
Expression that is a polynomial variable, i.e. an expression that cannot be
reduced further.
"""
-
- def __hash__(self):
- return self.underlying.__hash__()
+ @property
+ def var(self):
+ return self.underlying
@override
@property