def normalise(img, mean, std):
    """
    Normalise an image with a certain mean and standard deviation. Can be different for different bands.

    Parameters
    ----------
    img : numpy.ndarray
        The image to be normalised.
    mean : float or numpy.ndarray
        Either a float to be the mean for all bands or a numpy.ndarray with the mean for each band.
    std : float or numpy.ndarray
        The same as for the means but with standard deviations instead.

    Returns
    -------
    norm_img : numpy.ndarray
        The normalised image.
    """
    norm_img = (img - mean) / std
    return norm_img
