import torch


def eval_vc_mask(sparse_vc, index):
    """sparse_vc: [n, k, c]
    out: [n, k, c] but only index on dim is activated, others are zero masked out"""
    eval_vc_mask = torch.zeros_like(sparse_vc)
    eval_vc_mask[:, index, :] = 1.
    # eval_vc_mask[:, index+2, :] = 1.
    print(f"eval_vc_mask {eval_vc_mask.sum()}; index {index}")
    out = sparse_vc * eval_vc_mask
    print(f"out {out.mean()}")
    return out