def compute_labels(pos, neg):
 labels = np.zeros((len(pos) + len(neg)))
 labels[:len(pos)] = 1.0
 labels[len(pos):] = 0.0
 return labels

def compute_labels ( pos , neg ) : labels = np . zeros ( ( len ( pos ) + len ( neg ) ) ) labels [ : len ( pos ) ] = 1.0 labels [ len ( pos ) : ] = 0.0 return labels
construct list of labels .