Skip to content

Commit c1b2e1a

Browse files
committed
Add comments that MatAdd and MatMul probably shouldn't be subclassing from Add and Mul
There are some test failures right now if you remove them, at least in the printers because they are using the Add and Mul printers, possibly other places as well. For now we can leave it be but leave a comment that we might want to remove them if they cause problems.
1 parent 49e52da commit c1b2e1a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

sympy/matrices/expressions/matadd.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
from sympy.matrices.expressions.matexpr import (MatrixExpr, ShapeError,
1313
ZeroMatrix, GenericZeroMatrix)
1414
from sympy.utilities import default_sort_key, sift
15-
from sympy.core.operations import AssocOp
16-
1715

16+
# XXX: MatAdd should perhaps not subclass directly from Add
1817
class MatAdd(MatrixExpr, Add):
1918
"""A Sum of Matrix Expressions
2019

sympy/matrices/expressions/matmul.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import print_function, division
22

33
from sympy import Number
4-
from sympy.core import Mul, Basic, sympify, Add
4+
from sympy.core import Mul, Basic, sympify
55
from sympy.core.compatibility import range
66
from sympy.functions import adjoint
77
from sympy.matrices.expressions.transpose import transpose
@@ -12,7 +12,7 @@
1212
from sympy.matrices.expressions.matpow import MatPow
1313
from sympy.matrices.matrices import MatrixBase
1414

15-
15+
# XXX: MatMul should perhaps not subclass directly from Mul
1616
class MatMul(MatrixExpr, Mul):
1717
"""
1818
A product of matrix expressions

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy