def _compute_residual(proj_op, B_orig, fwd_orig, Q):
 return (np.dot(proj_op, B_orig) - np.dot(np.dot(Q, fwd_orig), proj_op.T))

def _compute_residual ( proj_op , B_orig , fwd_orig , Q ) : return ( np . dot ( proj_op , B_orig ) - np . dot ( np . dot ( Q , fwd_orig ) , proj_op . T ) )
compute the residual .