<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>