I went ahead and filed a ticket (<a href="https://github.com/numpy/numpy/issues/2700">https://github.com/numpy/numpy/issues/2700</a>) for historical purposes…and so those on the MPL list can follow up.<div><br></div><div><br>

</div><div>PTM</div><div><br></div><div><br><div><br clear="all">---<br>Patrick Marsh<br>Ph.D. Candidate / Liaison to the HWT<br>School of Meteorology / University of Oklahoma<br>Cooperative Institute for Mesoscale Meteorological Studies<br>

National Severe Storms Laboratory<br><a href="http://www.patricktmarsh.com/" target="_blank">http://www.patricktmarsh.com</a><br><br>
<br><br><div class="gmail_quote">On Mon, Oct 29, 2012 at 10:18 AM, Benjamin Root <span dir="ltr"><<a href="mailto:ben.root@ou.edu" target="_blank">ben.root@ou.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br><br><div class="gmail_quote"><div><div class="h5">On Mon, Oct 29, 2012 at 11:04 AM, Patrick Marsh <span dir="ltr"><<a href="mailto:patrickmarshwx@gmail.com" target="_blank">patrickmarshwx@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Turns out it isn't the commit I thought it was. I'm currently going through a git bisect to track down the actual commit that introduced this bug. I'll post back when I've found it.<div><br></div><div><br>



</div>

<div>PTM<br clear="all">---<br>Patrick Marsh<br>Ph.D. Candidate / Liaison to the HWT<br>School of Meteorology / University of Oklahoma<br>Cooperative Institute for Mesoscale Meteorological Studies<br>National Severe Storms Laboratory<br>





<a href="http://www.patricktmarsh.com/" target="_blank">http://www.patricktmarsh.com</a><br><br>
<br><br><div class="gmail_quote"><div><div>On Mon, Oct 29, 2012 at 9:43 AM, Benjamin Root <span dir="ltr"><<a href="mailto:ben.root@ou.edu" target="_blank">ben.root@ou.edu</a>></span> wrote:<br></div></div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>

<br><br><div class="gmail_quote"><div>On Mon, Oct 29, 2012 at 10:33 AM, Sebastian Berg <span dir="ltr"><<a href="mailto:sebastian@sipsolutions.net" target="_blank">sebastian@sipsolutions.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hey,<br>
<div><br>
On Mon, 2012-10-29 at 09:54 -0400, Benjamin Root wrote:<br>
> This error started showing up in the test suite for mpl when using<br>
> numpy master.<br>
><br>
> AttributeError: incompatible shape for a non-contiguous array<br>
><br>
> The tracebacks all point back to various code points where we are<br>
> trying to set the shape of an array, e.g.,<br>
><br>
> offsets.shape = (-1, 2)<br>
><br>
</div>Could you give a hint what these arrays history (how it was created) and<br>
maybe .shape/.strides is? Sounds like the array is not contiguous when<br>
it is expected to be, or the attribute setting itself fails in some<br>
corner cases on master?<br>
<br>
Regards,<br>
<br>
Sebastian<br>
<div><br></div></blockquote></div><div><br>The original reporter of the bug dug into the commit list and suspects it was this one:<br><br><a href="https://github.com/numpy/numpy/commit/02ebf8b3e7674a6b8a06636feaa6c761fcdf4e2d" target="_blank">https://github.com/numpy/numpy/commit/02ebf8b3e7674a6b8a06636feaa6c761fcdf4e2d</a><br>







<br>However, it might be earlier than that (he is currently doing a clean rebuild to make sure).<br><br>As for the history:<br><br>            offsets = np.asanyarray(offsets)<br>            offsets.shape = (-1, 2)             # Make it Nx2<br>







<br>Where "offsets" comes in from (possibly) user-supplied data.  Nothing really all that special.  I will see if I can get stride information.<br><br>Ben Root<br></div></div><br></div></div></blockquote></div>



</div></blockquote></div></div><div><br>Further digging reveals that the code fails when the array is originally 1-D.  I had an array with shape (2,) and stride (8,).  The reshaping should result in a shape of (1, 2).<br>

<br>Ben Root<br>

<br></div></div>
<br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br></div></div>