Skip to content

segment_axis (Trac #901) #1499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 10 comments
Closed

segment_axis (Trac #901) #1499

numpy-gitbot opened this issue Oct 19, 2012 · 10 comments

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/901 on 2008-08-31 by @cournape, assigned to @charris.

A patch to have segment_axis (contributed by Anne Archibald I believe) in numpy with tests. It uses as_strided

@numpy-gitbot
Copy link
Author

Attachment added by @cournape on 2008-08-31: segmentaxis.py

@numpy-gitbot
Copy link
Author

Attachment added by @cournape on 2008-08-31: test_segmentaxis.py

@jeremyherbert
Copy link

Will this ever be merged? If there is a problem with it, is there something that I could do to help move it along ?

@roger-
Copy link

roger- commented Aug 31, 2015

+1, very useful and I'd love to see this merged.

@seberg
Copy link
Member

seberg commented Aug 31, 2015

@jeremyherbert see also #31

I think we can add something like this. The details need to be hashed out. Like my version has arbitrary dimensions, but no padding. And some of the design choices need to be cleaned up. If you have the patience, please feel do try to figure out what you think is the right functionality/features for such a function.

Then open a pull request and notifying the mailing list for some discussion (in whichever order) and we can get this going.

@dashesy
Copy link

dashesy commented Jan 7, 2016

This is very useful! I hoped nditer would do something like this but it cannot.

@RosterIn
Copy link

This one is really ancient and i too think it can be useful

@eric-wieser
Copy link
Member

The patches above are dead links. @rgommers, do you know what happened to the hosting of those uploads? Did perhaps the directory structure just change?

If they're not recoverable, I think we have no choice but to close this issue.

@rgommers
Copy link
Member

There's still a static archive somewhere I believe, but I don't have a link at hand and am unsure in what form it survived the server migration ~2 years ago. It may also be a case of a broken redirect. @rkern or @pv may know.

Reading the comments above, @seberg seems to have another version of it though

@seberg seberg self-assigned this Apr 16, 2019
@seberg
Copy link
Member

seberg commented Feb 24, 2021

I actually found the original thing here: https://scipy-cookbook.readthedocs.io/_static/items/attachments/SegmentAxis/segmentaxis.py

In any case, this is the new np.lib.stride_tricks.sliding_window_view, so I will close this. The only thing could be to see if we can make to scipy-cookbook use our new version.

@seberg seberg closed this as completed Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants