(m, **options)
Convert a numpy/scipy.sparse matrix to a sympy matrix.
Convert a numpy/scipy.sparse matrix to a sympy matrix.
Convert a numpy / scipy . sparse matrix to a sympy matrix .
def to_sympy(m, **options):
    """Convert a numpy/scipy.sparse matrix to a sympy matrix."""
    if isinstance(m, Matrix):
        return m
    elif isinstance(m, numpy_ndarray):
        return numpy_to_sympy(m)
    elif isinstance(m, scipy_sparse_matrix):
        return scipy_sparse_to_sympy(m)
    elif isinstance(m, Expr):
        return m
    raise TypeError('Expected sympy/numpy/scipy.sparse matrix, got: %r' % m)
def to_sympy ( m , * * options ) : if isinstance ( m , Matrix ) : return m elif isinstance ( m , numpy_ndarray ) : return numpy_to_sympy ( m ) elif isinstance ( m , scipy_sparse_matrix ) : return scipy_sparse_to_sympy ( m ) elif isinstance ( m , Expr ) : return m raise TypeError ( 'Expected sympy/numpy/scipy.sparse matrix, got: %r' % m )