Did I find the right examples for you? yes no

All Samples(20)  |  Call(4)  |  Derive(0)  |  Import(16)
Wrong matrix shape

src/s/y/sympy-0.7.5/sympy/matrices/expressions/matexpr.py   sympy(Download)
from sympy.core.sympify import SympifyError, sympify
from sympy.functions import conjugate, adjoint
from sympy.matrices import ShapeError
from sympy.simplify import simplify
 
    def __pow__(self, other):
        if not self.is_square:
            raise ShapeError("Power of non-square matrix %s" % self)
        if other is S.NegativeOne:
            return Inverse(self)
    def __pow__(self, other):
        if other != 1 and not self.is_square:
            raise ShapeError("Power of non-square matrix %s" % self)
        if other == 0:
            return Identity(self.rows)

src/s/y/sympy-HEAD/sympy/matrices/expressions/matexpr.py   sympy(Download)
from sympy.core.sympify import SympifyError, sympify
from sympy.functions import conjugate, adjoint
from sympy.matrices import ShapeError
from sympy.simplify import simplify
 
    def __pow__(self, other):
        if not self.is_square:
            raise ShapeError("Power of non-square matrix %s" % self)
        if other is S.NegativeOne:
            return Inverse(self)
    def __pow__(self, other):
        if other != 1 and not self.is_square:
            raise ShapeError("Power of non-square matrix %s" % self)
        if other == 0:
            return Identity(self.rows)

src/s/y/sympy-0.7.5/sympy/matrices/expressions/blockmatrix.py   sympy(Download)
from sympy.matrices.expressions.slice import MatrixSlice
from sympy.matrices.expressions.inverse import Inverse
from sympy.matrices import Matrix, eye, ShapeError
 
 

src/s/y/sympy-HEAD/sympy/matrices/expressions/blockmatrix.py   sympy(Download)
from sympy.matrices.expressions.slice import MatrixSlice
from sympy.matrices.expressions.inverse import Inverse
from sympy.matrices import Matrix, eye, ShapeError
 
 

src/s/y/sympy-0.7.5/sympy/matrices/expressions/tests/test_matrix_exprs.py   sympy(Download)
from sympy.core import S, symbols, Add, Mul
from sympy.functions import transpose, sin, cos, sqrt
from sympy.simplify import simplify
from sympy.matrices import (Identity, ImmutableMatrix, Inverse, MatAdd, MatMul,
        MatPow, Matrix, MatrixExpr, MatrixSymbol, ShapeError, ZeroMatrix,

src/s/y/sympy-HEAD/sympy/matrices/expressions/tests/test_matrix_exprs.py   sympy(Download)
from sympy.core import S, symbols, Add, Mul
from sympy.functions import transpose, sin, cos, sqrt
from sympy.simplify import simplify
from sympy.matrices import (Identity, ImmutableMatrix, Inverse, MatAdd, MatMul,
        MatPow, Matrix, MatrixExpr, MatrixSymbol, ShapeError, ZeroMatrix,

src/s/y/sympy-HEAD/sympy/matrices/tests/test_sparse.py   sympy(Download)
from sympy import S, Symbol, I, Rational, PurePoly
from sympy.matrices import Matrix, SparseMatrix, eye, zeros, ShapeError
from sympy.utilities.pytest import raises, XFAIL
 
 

src/s/y/sympy-HEAD/sympy/matrices/expressions/tests/test_trace.py   sympy(Download)
from sympy.core import Lambda, S, symbols
from sympy.concrete import Sum
from sympy.functions import adjoint, conjugate, transpose
from sympy.matrices import eye, Matrix, ShapeError
from sympy.matrices.expressions import (

src/s/y/sympy-HEAD/sympy/matrices/expressions/tests/test_inverse.py   sympy(Download)
from sympy.core import symbols, S
from sympy.functions import adjoint, conjugate, transpose
from sympy.matrices.expressions import MatrixSymbol, Inverse
from sympy.matrices import eye, Identity, Matrix, ShapeError
from sympy.utilities.pytest import raises

src/s/y/sympy-HEAD/sympy/matrices/expressions/tests/test_hadamard.py   sympy(Download)
from sympy.core import symbols
from sympy.utilities.pytest import raises
 
from sympy.matrices import ShapeError, MatrixSymbol
from sympy.matrices.expressions import HadamardProduct, hadamard_product

  1 | 2  Next