

def mask_zero(data, tech, var='r', locations=None):
    '\n    Mask where ``var`` for the technology ``tech``\n    across the given list of ``locations`` is zero.\n\n    ``var`` defaults to ``r``.\n\n    If ``locations`` not given, uses all available locations.\n\n    '
    df = data[var][tech]
    if data:
        df = df.loc[:, locations]
    mask = pd.Series(0, index=list(range(len(df))))
    mask[(df.sum(1) <= 0)] = 1
    mask.name = 'mask'
    return mask

dataset/ETHPy150Open calliope-project/calliope/calliope/time_masks.py mask_zero/VarMisuse@33/122 `locations`->`data`