def generate_candidates(self, train_pos_unid_inid_map, test_pos_unid_inid_map, neg_unid_inid_map, u_nid):
    pos_i_nids = test_pos_unid_inid_map[u_nid]
    neg_i_nids = np.array(neg_unid_inid_map[u_nid])
    neg_i_nids_indices = np.array(rd.sample(range(neg_i_nids.shape[0]), 99), dtype=int)
    return (pos_i_nids, list(neg_i_nids[neg_i_nids_indices]))
def generate_candidates(self, train_pos_unid_inid_map, test_pos_unid_inid_map, neg_unid_inid_map, u_nid):
    pos_i_nids = test_pos_unid_inid_map[u_nid]
    neg_i_nids = np.array(neg_unid_inid_map[u_nid])
    neg_i_nids_indices = np.array(rd.sample(range(neg_i_nids.shape[0]), 99), dtype=int)
    return (pos_i_nids, list(neg_i_nids[neg_i_nids_indices]))