<div dir="ltr">As I posted to the github issue, I support #2 as it is the original meaning. The most common case of isfortran that I recall was to support transpositions that needed to occur before calling Fortran-compiled linear algebra routines. <div><br></div><div>However, with that said, you could also reasonably do #1 and likely have no real problem --- because transposing a 1-d array doesn't have any effect. </div><div><br></div><div>In NumPy 1.0.1, isfortran was intended to be True only for arrays with a.ndim > 1. Thus, it would have been possible for someone to rely on that invariant for some other reason.      </div><div><br></div><div>With relaxed stride checking, this invariant changed because isfortran was implemented by returning True if the F_Contiguous flag was set but the C_Contiguous flag was not (this was only ever previously possible for a.ndim > 1). </div><div><br></div><div>If you choose to go with #1, please emphasize in the release notes that isfortran now does not assume a.ndim > 1 but is simply short-hand for a.flags.f_contiguous. </div><div><br></div><div>-Travis</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 30, 2015 at 5:12 PM, Charles R Harris <span dir="ltr"><<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</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>Hi All,<br><br></div>The isfortran function calls a.fnc (Fortran-Not-C), which is implemented as  F_CONTIGUOUS &&  !C_CONTIGUOUS. Before relaxed stride checking contiguous multidimensional arrays could not be both and continguous 1-D arrays were always CONTIGUOUS, but this is not longer the case. Consequently current isfortran breaks backward compatiblity. There are two suggested solutions<br><ol><li>Return `a.flags.f_contiguous`. This differs for 1-D arrays, but is most consistent with the name isfortran.</li><li>Return `a.flags.f_contiguous and a.ndim > 1`, which would be backward compatible.</li></ol><p>It is also possible to start with 2. but add a FutureWarning and later move to 1, which it my preferred solution. See <a href="https://github.com/numpy/numpy/issues/6590" target="_blank">gh-6590</a> for the issue. <br></p><p>Thoughts?<br></p></div>
<br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div style="font-size:12.8000001907349px;color:rgb(136,136,136)"><b><br>Travis Oliphant</b></div><div style="font-size:12.8000001907349px;color:rgb(136,136,136)"><i>Co-founder and CEO</i></div><div style="font-size:12.8000001907349px;color:rgb(136,136,136)"><i><br></i></div><div style="font-size:12.8000001907349px;color:rgb(136,136,136)"><img src="https://docs.google.com/a/continuum.io/uc?id=0B8_D9l6ZUhNIaF9HbGZSV09TNHc&export=download" width="200" height="37"></div></div><div style="font-size:12.8000001907349px;color:rgb(136,136,136)"><br></div><div style="font-size:12.8000001907349px;color:rgb(136,136,136)">@teoliphant</div><div style="font-size:12.8000001907349px;color:rgb(136,136,136)">512-222-5440</div><div style="font-size:12.8000001907349px;color:rgb(136,136,136)"><a href="http://www.continuum.io" target="_blank">http://www.continuum.io</a></div></div></div></div></div></div>
</div>