Вы можете использовать списки, чтобы сохранить его в списке списков:
from window_slider import Slider
import numpy
import pandas as pd
list = numpy.array([0, 1, 2, 3, 4, 5, 6, 7 ,8])
bucket_size = 3
overlap_count = 0
slider = Slider(bucket_size,overlap_count)
slider.fit(list)
#Master list which consists of all the lists of arrays
output_list = []
while True:
window_data = slider.slide()
#Convert the window_data array to a list
output_df_list = window_data.tolist()
#Append the "output_df_list" to the master list "output_list"
output_list.append(output_df_list)
print(window_data)
if slider.reached_end_of_list(): break
Вывод:
print(output_list)
[[0, 1, 2], [3, 4, 5], [6, 7, 8]]