<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 5, 2020 at 4:56 PM Sebastian Berg <<a href="mailto:sebastian@sipsolutions.net">sebastian@sipsolutions.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
just a brief note that I merged this proposal:<br>
<br>
    <a href="https://github.com/numpy/numpy/pull/17394" rel="noreferrer" target="_blank">https://github.com/numpy/numpy/pull/17394</a><br>
<br>
adding `np.sliding_window_view` into the 1.20 release of NumPy.<br>
<br>
There was only one public API change, and that is that the `shape`<br>
argument is now called `window_shape`.<br>
<br>
This is still a good time for feedback in case you have a better idea<br>
e.g. for the function or parameter names.<br></blockquote><div><br></div><div>The old PR had this in the lib.stride_tricks namespace. Seeing it in the main namespace is unexpected and likely will lead to issues/questions, given that such an overlapping view is going to do behave in ways the average user will be surprised by. It may also lead to requests for other array/tensor libraries to implement this. I don't see any discussion on this in PR 17394, it looks like a decision by the PR author that no one commented on - reconsider that?</div><div><br></div><div>Cheers,</div><div>Ralf</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Cheers,<br>
<br>
Sebastian<br>
<br>
<br>
<br>
On Mon, 2020-10-12 at 08:39 +0000, Zimmermann Klaus wrote:<br>
> Hello,<br>
> <br>
> I would like to draw the attention of this list to PR #17394 [1] that<br>
> adds the implementation of a sliding window view to numpy.<br>
> <br>
> Having a sliding window view in numpy is a longstanding open issue<br>
> (cf<br>
> #7753 [2] from 2016). A brief summary of the discussions surrounding<br>
> it<br>
> can be found in the description of the PR.<br>
> <br>
> This PR implements a sliding window view based on stride tricks.<br>
> Following the discussion in issue #7753, a first implementation was<br>
> provided by Fanjin Zeng in PR #10771. After some discussion, that PR<br>
> stalled and I picked up the issue in the present PR #17394. It is<br>
> based<br>
> on the first implementation, but follows the changed API as suggested<br>
> by<br>
> Eric Wieser.<br>
> <br>
> Code reviews have been provided by Bas van Beek, Stephen Hoyer, and<br>
> Eric<br>
> Wieser. Sebastian Berg added the "62 - Python API" label.<br>
> <br>
> <br>
> Do you think this is suitable for inclusion in numpy?<br>
> <br>
> Do you consider the PR ready?<br>
> <br>
> Do you have suggestions or requests?<br>
> <br>
> <br>
> Thanks for your time and consideration!<br>
> Klaus<br>
> <br>
> <br>
> [1] <a href="https://github.com/numpy/numpy/pull/17394" rel="noreferrer" target="_blank">https://github.com/numpy/numpy/pull/17394</a><br>
> [2] <a href="https://github.com/numpy/numpy/issues/7753" rel="noreferrer" target="_blank">https://github.com/numpy/numpy/issues/7753</a><br>
> _______________________________________________<br>
> NumPy-Discussion mailing list<br>
> <a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
> <br>
<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div></div>