def band_array_ensure_ndim(array):
    """
    Ensure there are three dimensions for a band-like array.

    Sometimes, we general band array with (nk, nb) without the first dimension.
    This function ensures that there are three dimensions (ns, nk, nb).
    """
    if array.ndim == 2:
        return array.reshape((1, ) + array.shape)
    return array