def sparse(v):
    for f, w in list(v.items()):
        if w == 0:
            del v[f]
    return v
Returns the vector with features that have weight 0 removed.
dataset/ETHPy150Open clips/pattern/pattern/vector/__init__.py/sparse