def degree_hist_to_list(d, dc): degree = np.repeat(np.round(d).astype(int), np.round(dc).astype(int)) return degree