def neg_middle(data):
    """
    Negate middle half.
    """
    data[(...), int(data.shape[-1] * 1.0 / 4.0):int(data.shape[-1] * 3.0 / 4.0)
        ] = -data[(...), int(data.shape[-1] * 1.0 / 4.0):int(data.shape[-1] *
        3.0 / 4.0)]
    return data
