--- name: rolling_window kind: function lang: py domain: datascience version: "1.0.0" purity: pure signature: "def rolling_window(xs: list, size: int) -> list" description: "Genera ventanas deslizantes de tamanio fijo sobre una lista." tags: [windowing, timeseries, python] uses_functions: [] uses_types: [] returns: [] returns_optional: false error_type: "" imports: [] tested: false tests: [] test_file_path: "" file_path: "python/functions/datascience/datascience.py" --- ## Ejemplo ```python rolling_window([1, 2, 3, 4, 5], 3) # [[1, 2, 3], [2, 3, 4], [3, 4, 5]] ``` ## Notas Retorna lista vacia si size <= 0 o size > len(xs). Util para calcular medias moviles u otras metricas sobre ventanas.