<br><br><div class="gmail_quote">On Tue, Jun 4, 2013 at 12:07 PM, Slavin, Jonathan <span dir="ltr"><<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">

I would like to suggest that the behavior of numpy.interp be changed regarding treatment of situations in which the x-coordinates are not monotonically increasing.  Specifically, it seems to me that interp should work correctly when the x-coordinate is decreasing monotonically.  Clearly it cannot work if the x-coordinate is not monotonic, but in that case it should raise an exception.  Currently if x is not increasing it simply silently fails, providing incorrect values.  This fix could be as simple as a monotonicity test and inversion if necessary (plus a raise statement for non-monotonic cases).</div>

<div class="gmail_default" style="font-family:verdana,sans-serif"><br></div></div></blockquote><div><br>Seems reasonable, although it might add a bit of execution time.<br><br>Chuck <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"></div><br></div></blockquote></div>