aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-03-02 18:14:55 +0100
committerNao Pross <np@0hm.ch>2024-03-02 18:14:55 +0100
commit9652556910111a05f8e5349bfddb00280c67ee32 (patch)
treeabc338b89f3631f12e4b30c9e5315ff2b22529da
parentExport State class to API (diff)
downloadmdpoly-9652556910111a05f8e5349bfddb00280c67ee32.tar.gz
mdpoly-9652556910111a05f8e5349bfddb00280c67ee32.zip
Fix bug in SparseRepr.terms
-rw-r--r--mdpoly/representations.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdpoly/representations.py b/mdpoly/representations.py
index de03838..0cda642 100644
--- a/mdpoly/representations.py
+++ b/mdpoly/representations.py
@@ -40,9 +40,9 @@ class SparseRepr(Repr):
""" Return indices to non-zero terms in the polynomial at the given
matrix entry """
if entry in self.data.keys():
- yield from self.data[entry]
+ yield from self.data[entry].keys()
- return []
+ return tuple()
class HasSparseRepr(Protocol):