From 85c3129f1483d91caf0974e9747be279210d530a Mon Sep 17 00:00:00 2001 From: Marc-Antoine Schmidt Date: Sat, 28 Aug 2021 13:57:16 -0400 Subject: [PATCH] improved __repr__ for splitmatrix --- src/quantcore/matrix/split_matrix.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/quantcore/matrix/split_matrix.py b/src/quantcore/matrix/split_matrix.py index 22554fa4..e78685cd 100644 --- a/src/quantcore/matrix/split_matrix.py +++ b/src/quantcore/matrix/split_matrix.py @@ -384,7 +384,10 @@ def __getitem__(self, key): def __repr__(self): out = "SplitMatrix:" for i, mat in enumerate(self.matrices): - out += f"\n\nComponent {i} with type {mat.__class__.__name__}\n" + str(mat) + out += ( + f"\n\nComponent {i} with type {mat.__class__.__name__}\n" + + mat.__repr__() + ) return out __array_priority__ = 13