def _unitary(norm):
    """_unitary() utility copied from numpy"""
    if norm not in (None, 'ortho'):
        raise ValueError(
            'Invalid norm value %s, should be None or "ortho".' % norm)
    return norm is not None
