Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(16)  |  Call(8)  |  Derive(0)  |  Import(8)

src/s/y/sympy-HEAD/sympy/matrices/expressions/matmul.py   sympy(Download)
from sympy.strategies import (rm_id, unpack, typed, debug, flatten, exhaust,
        do_one, new)
from sympy.matrices.expressions.matexpr import (MatrixExpr, ShapeError,
        Identity, ZeroMatrix)
 
        A, B = matrices[i:i+2]
        if A.cols != B.rows:
            raise ShapeError("Matrices %s and %s are not aligned"%(A, B))
 
# Rules

src/s/y/sympy-0.7.5/sympy/matrices/expressions/matmul.py   sympy(Download)
from sympy.strategies import (rm_id, unpack, typed, debug, flatten, exhaust,
        do_one, new)
from sympy.matrices.expressions.matexpr import (MatrixExpr, ShapeError,
        Identity, ZeroMatrix)
 
        A, B = matrices[i:i+2]
        if A.cols != B.rows:
            raise ShapeError("Matrices %s and %s are not aligned"%(A, B))
 
# Rules

src/s/y/sympy-HEAD/sympy/matrices/expressions/matadd.py   sympy(Download)
from sympy.strategies import (rm_id, unpack, flatten, sort, condition, debug,
        exhaust, do_one, glom)
from sympy.matrices.expressions.matexpr import MatrixExpr, ShapeError, ZeroMatrix
from sympy.utilities import default_sort_key
 
    for B in args[1:]:
        if A.shape != B.shape:
            raise ShapeError("Matrices %s and %s are not aligned"%(A, B))
 
factor_of = lambda arg: arg.as_coeff_mmul()[0]

src/s/y/sympy-0.7.5/sympy/matrices/expressions/matadd.py   sympy(Download)
from sympy.strategies import (rm_id, unpack, flatten, sort, condition, debug,
        exhaust, do_one, glom)
from sympy.matrices.expressions.matexpr import MatrixExpr, ShapeError, ZeroMatrix
from sympy.utilities import default_sort_key
 
    for B in args[1:]:
        if A.shape != B.shape:
            raise ShapeError("Matrices %s and %s are not aligned"%(A, B))
 
factor_of = lambda arg: arg.as_coeff_mmul()[0]

src/s/y/sympy-HEAD/sympy/matrices/expressions/hadamard.py   sympy(Download)
from sympy.strategies import unpack, flatten, sort, condition, exhaust, do_one
 
from sympy.matrices.expressions.matexpr import MatrixExpr, ShapeError
 
def hadamard_product(*matrices):
    for B in args[1:]:
        if A.shape != B.shape:
            raise ShapeError("Matrices %s and %s are not aligned" % (A, B))
 
rules = (unpack,

src/s/y/sympy-0.7.5/sympy/matrices/expressions/hadamard.py   sympy(Download)
from sympy.strategies import unpack, flatten, sort, condition, exhaust, do_one
 
from sympy.matrices.expressions.matexpr import MatrixExpr, ShapeError
 
def hadamard_product(*matrices):
    for B in args[1:]:
        if A.shape != B.shape:
            raise ShapeError("Matrices %s and %s are not aligned" % (A, B))
 
rules = (unpack,

src/s/y/sympy-HEAD/sympy/matrices/expressions/inverse.py   sympy(Download)
from sympy.core import S, Basic
 
from sympy.matrices.expressions.matexpr import ShapeError
from sympy.matrices.expressions.matpow import MatPow
 
    def __new__(cls, mat):
        mat = _sympify(mat)
        assert mat.is_Matrix
        if not mat.is_square:
            raise ShapeError("Inverse of non-square matrix %s" % mat)

src/s/y/sympy-0.7.5/sympy/matrices/expressions/inverse.py   sympy(Download)
from sympy.core import S, Basic
 
from sympy.matrices.expressions.matexpr import ShapeError
from sympy.matrices.expressions.matpow import MatPow
 
            raise TypeError("mat should be a matrix")
        if not mat.is_square:
            raise ShapeError("Inverse of non-square matrix %s" % mat)
        return Basic.__new__(cls, mat)