From 1e86d0946280b05e7ee41bb772041e234ec6d8e7 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sun, 2 Jun 2024 15:39:09 +0200 Subject: Give better name to member of BroadcastPolyMatrix --- polymatrix/polymatrix/impl.py | 2 +- polymatrix/polymatrix/mixins.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/polymatrix/polymatrix/impl.py b/polymatrix/polymatrix/impl.py index bb42313..a6a1acf 100644 --- a/polymatrix/polymatrix/impl.py +++ b/polymatrix/polymatrix/impl.py @@ -38,7 +38,7 @@ class PolyMatrixImpl(PolyMatrix): @dataclassabc.dataclassabc(frozen=True) class BroadcastPolyMatrixImpl(BroadcastPolyMatrixMixin): - data: PolyDict + polynomial: PolyDict shape: tuple[int, int] diff --git a/polymatrix/polymatrix/mixins.py b/polymatrix/polymatrix/mixins.py index c12f4cc..bb2fc17 100644 --- a/polymatrix/polymatrix/mixins.py +++ b/polymatrix/polymatrix/mixins.py @@ -118,7 +118,8 @@ class BroadcastPolyMatrixMixin(PolyMatrixMixin, ABC): """ @property @abstractmethod - def data(self) -> PolyDict: ... + def polynomial(self) -> PolyDict: + """ Scalar polynomial that is broadcasted. """ @override def at(self, row: int, col: int) -> PolyDict: @@ -129,7 +130,7 @@ class BroadcastPolyMatrixMixin(PolyMatrixMixin, ABC): @override def get_poly(self, col: int, row: int) -> PolyDict | None: - return self.data or None + return self.polynomial or None class BlockPolyMatrixMixin(PolyMatrixMixin, ABC): -- cgit v1.2.1