I'd like to get array of numpy arrays with ranged lengths like this:
>>> source = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
>>> get_array_of_arrays_with_min_length(source, 5)
array([[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
[2, 3, 4, 5, 6, 7, 8, 9, 10],
[3, 4, 5, 6, 7, 8, 9, 10],
[4, 5, 6, 7, 8, 9, 10],
[5, 6, 7, 8, 9, 10],
[6, 7, 8, 9, 10]])
How to do this with less code?
NumPymight not be the right tool for you.