Skip to content

Commit 31009b3

Browse files
committed
An attempt to prepare mask for case S -> A B_i.
1 parent adab93f commit 31009b3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cfpq_matrix/block/block_matrix.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ def mxm(self, other: Matrix, op: Semiring, mask: Matrix, swap_operands: bool = F
4343
BlockMatrixOrientation.VERTICAL
4444
if swap_operands
4545
else BlockMatrixOrientation.HORIZONTAL
46-
)
46+
)
47+
elif not mask is None:
48+
mask = self.block_matrix_space.hyper_rotate(
49+
mask,
50+
BlockMatrixOrientation.VERTICAL
51+
if swap_operands
52+
else BlockMatrixOrientation.HORIZONTAL
53+
)
4754

4855
return self.base.mxm(
4956
self.block_matrix_space.hyper_rotate(

0 commit comments

Comments
 (0)