8000 Move `sliding_window_view` to the main module and add `step_size` · Issue #18244 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
Move sliding_window_view to the main module and add step_size #18244
Open
@tomerh2001

Description

@tomerh2001
  1. Writing np.lib.stride_tricks.sliding_window_view is a bit of a mouthful, I think it would be better if it was placed inside the main module. (also doing import from is a bit inconvenient)
  2. I suggest adding a step_size parameter to the function, an example of its use would be:
x = np.arange(10)
sliding_window_view(x, 3, step_size=2) 

>> array([[0, 1, 2],
          [2, 3, 4],
          [4, 5, 6],
          [6, 7, 8]])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0