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))

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 ) )
convert a numpy/scipy .