(uid, vec, topn=100)
return pnames2ids(pnames)
vec is np.array
vec is np.array
vec is np . array
def vec2pids(uid, vec, topn=100):
    """
    vec is np.array
    """
    
    sim_items = model.similar_by_vector(vec, topn=topn)
    pnames = user_order.loc[user_order.user_id==uid, 'product_name'].values[0]
    
    pnames = [i for i,v in sim_items if i in pnames]
    
    return pnames2ids(pnames)
def vec2pids ( uid , vec , topn = 100 ) : sim_items = model . similar_by_vector ( vec , topn = topn ) pnames = user_order . loc [ user_order . user_id == uid , 'product_name' ] . values [ 0 ] pnames = [ i for i , v in sim_items if i in pnames ] return pnames2ids ( pnames )