def idx_to_zbin(idx):
    """
    Returns the redshift bin corresponding to a row or column index in the matrix of power spectra. Redshift bins are
    numbered from 1, and shear B-mode is not taken into account.

    Args:
        idx (int): Row or column index.

    Returns:
        int: The corresponding redshift bin number.
    """

    return 1 + idx // 2