Skip to content

Instantly share code, notes, and snippets.

View RahulDas-dev's full-sized avatar
🏠
Working from home

Rahul Das RahulDas-dev

🏠
Working from home
View GitHub Profile
@RahulDas-dev
RahulDas-dev / sliding_window.py
Created August 8, 2022 08:29
1D Sliding Window
import math
from typing import List
def sliding_window(input_: List[int], kernel_: List[int]) -> List[int]:
# Checking input and kernel length constraint
if len(kernel_) > len(input_):
raise ValueError("Input Size must be gratter than Kernel size")
start_index = 0