From 9652556910111a05f8e5349bfddb00280c67ee32 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sat, 2 Mar 2024 18:14:55 +0100 Subject: Fix bug in SparseRepr.terms --- mdpoly/representations.py | 4 ++-- 1 file 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): -- cgit v1.2.1