(filename)
Reads Cl from a healpix file, as IDL fits2cl.

    Parameters
    ----------
    filename : str or HDUList or HDU or pathlib.Path instance
      the fits file name

    Returns
    -------
    cl : array
      the cl array
Reads Cl from a healpix file, as IDL fits2cl.
Reads Cl from a healpix file as IDL fits2cl .
def read_cl(filename):
    """Reads Cl from a healpix file, as IDL fits2cl.

    Parameters
    ----------
    filename : str or HDUList or HDU or pathlib.Path instance
      the fits file name

    Returns
    -------
    cl : array
      the cl array
    """
    opened_file = False
    if isinstance(filename, allowed_paths):
        filename = pf.open(filename)
        opened_file = True
    fits_hdu = _get_hdu(filename, hdu=1)
    cl = np.array([fits_hdu.data.field(n) for n in range(len(fits_hdu.columns))])
    if opened_file:
        filename.close()
    if len(cl) == 1:
        return cl[0]
    else:
        return cl
def read_cl ( filename ) : opened_file = False if isinstance ( filename , allowed_paths ) : filename = pf . open ( filename ) opened_file = True fits_hdu = _get_hdu ( filename , hdu = 1 ) cl = np . array ( [ fits_hdu . data . field ( n ) for n in range ( len ( fits_hdu . columns ) ) ] ) if opened_file : filename . close ( ) if len ( cl ) == 1 : return cl [ 0 ] else : return cl