79503232

Date: 2025-03-12 10:12:02
Score: 0.5
Natty:
Report link

You can do this in one line with NumPy’s built-in functions using np.repeat with np.diff:

def expand_split_list(T):
    return np.repeat(np.arange(len(T) - 1), np.diff(T))
Reasons:
  • Low length (1):
  • Has code block (-0.5):
Posted by: EuanG