<div dir="auto">I'd also like to see a more detailed motivation for this.<div dir="auto"><br></div><div dir="auto">And, if it is useful, then that would make 3 operations that have special case pairwise moving window variants (subtract, floor_divide, true_divide). 3 is a lot of special cases. Should there instead be a generic mechanism for doing this for arbitrary binary operations?</div><div dir="auto"><br></div><div dir="auto">-n</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Jul 28, 2017 3:25 PM, "Joseph Fox-Rabinovitz" <<a href="mailto:jfoxrabinovitz@gmail.com">jfoxrabinovitz@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I have created PR#9481 to introduce a `ratio` function that behaves very similarly to `diff`, except that it divides successive elements instead of subtracting them. It has some handling built in for zero division, as well as the ability to select between `/` and `//` operators.<br><br></div>There is currently no masked version. Perhaps someone could suggest a simple mechanism for hooking np.ma.true_divide and np.ma.floor_divide in as the operators instead of the regular np.* versions.<br><br></div><div>Please let me know your thoughts.<br></div><div><br></div><div>Regards,<br></div><div><br></div>    -Joe<br></div>
<br>______________________________<wbr>_________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/numpy-<wbr>discussion</a><br>
<br></blockquote></div></div>