About 109,000 results
Open links in new tab
  1. python - Rolling or sliding window iterator? - Stack Overflow

    If you're looking to perform some kind of operation on each window as you iterate (e.g. sum() or max()) it is worth bearing in mind that there are efficient algorithms to compute the new value for each window …

  2. Sliding window of M-by-N shape numpy.ndarray - Stack Overflow

    Mar 31, 2013 · The multiple of 2 makes the sliding window slide 2 units at a time which is necessary for sliding over each tuple. Using numpy array slicing you can pass the sliding window into the flattened …

  3. Python sliding windows of a list - Stack Overflow

    Mar 17, 2021 · Python sliding windows of a list [duplicate] Asked 4 years, 8 months ago Modified 4 years, 8 months ago Viewed 7k times

  4. python - Max in a sliding window in NumPy array - Stack Overflow

    Apr 9, 2017 · 8 Starting in Numpy 1.20, the sliding_window_view provides a way to slide/roll through windows of elements. Windows that you can then find the max for:

  5. Sliding window in Python - Stack Overflow

    Dec 2, 2015 · Where did you get this code from? It differs materially from the solutions on Rolling or sliding window iterator in Python

  6. How can I calculate a rolling / moving average using Python + NumPy ...

    37 Starting in NumPy 1.20, the sliding_window_view provides a way to slide/roll through windows of elements. Windows that you can then individually average. For instance, for a 4 -element window:

  7. python - Sliding Window over Pandas Dataframe - Stack Overflow

    Apr 29, 2016 · I have a large pandas dataframe of time-series data. I currently manipulate this dataframe to create a new, smaller dataframe that is rolling average of every 10 rows. i.e. a rolling window techn...

  8. python - How do I do calculations with a sliding window while being ...

    Aug 24, 2024 · # a is an L x L array of type np.float32 swv = sliding_window_view(a, (3, 3)) # (L-2) x (L-2) x 3 x 3 directions = swv.reshape(L-2, L-2, 9)[:,:,1::2].argmax(axis = 2).astype(np.uint8) However, …

  9. python - sliding window data with pandas dataframe - Stack Overflow

    Sep 21, 2017 · python pandas dataframe sliding-window edited Sep 21, 2017 at 3:52 asked Sep 21, 2017 at 3:46 ultron

  10. Python Sliding Window on sentence string - Stack Overflow

    python string python-2.7 sliding-window edited Mar 16, 2017 at 19:30 UltraInstinct 44.6k 12 85 108