(e)
Return the dagger of a sympy/numpy/scipy.sparse matrix.
Return the dagger of a sympy/numpy/scipy.sparse matrix.
Return the dagger of a sympy / numpy / scipy . sparse matrix .
def matrix_dagger(e):
    """Return the dagger of a sympy/numpy/scipy.sparse matrix."""
    if isinstance(e, Matrix):
        return e.H
    elif isinstance(e, (numpy_ndarray, scipy_sparse_matrix)):
        return e.conjugate().transpose()
    raise TypeError('Expected sympy/numpy/scipy.sparse matrix, got: %r' % e)
def matrix_dagger ( e ) : if isinstance ( e , Matrix ) : return e . H elif isinstance ( e , ( numpy_ndarray , scipy_sparse_matrix ) ) : return e . conjugate ( ) . transpose ( ) raise TypeError ( 'Expected sympy/numpy/scipy.sparse matrix, got: %r' % e )