(model, items, default=200)
items: item list
items: item list
items : item list
def items2vec(model, items, default=200):
    """
    items: item list
    """
    try:
        items = valid_words(model, items)
        if len(items)==0:
            raise
        vec   = [model[w] for w in items]
        return np.array(vec).mean(axis=0)
    except:
        return np.ones(default)*-1
def items2vec ( model , items , default = 200 ) : try : items = valid_words ( model , items ) if len ( items ) == 0 : raise vec = [ model [ w ] for w in items ] return np . array ( vec ) . mean ( axis = 0 ) except : return np . ones ( default ) * - 1