Skip to content

Instantly share code, notes, and snippets.

Ryan meowklaski

Block or report user

Report or block meowklaski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
meowklaski /
Last active Oct 21, 2019
Use numpy to produce a view from a sliding, striding window over an array of arbitrary dimensions
def sliding_window_view(arr, window_shape, steps):
""" Produce a view from a sliding, striding window over `arr`.
The window is only placed in 'valid' positions - no overlapping
over the boundary.
arr : numpy.ndarray, shape=(...,[x, (...), z])
The array to slide the window over.
meowklaski /
Last active Jan 8, 2017
Updating a pypi package
  1. Tag the release: git tag x.x -m "Message."

  2. Push tag: git push --tags origin master

  3. Upload new package: python sdist upload -r pypi

You can’t perform that action at this time.