[Numpy-discussion] Regression in mpl: AttributeError: incompatible shape for a non-contiguous array

Sebastian Berg sebastian@sipsolutions....
Mon Oct 29 09:33:53 CDT 2012


Hey,

On Mon, 2012-10-29 at 09:54 -0400, Benjamin Root wrote:
> This error started showing up in the test suite for mpl when using
> numpy master.
> 
> AttributeError: incompatible shape for a non-contiguous array
> 
> The tracebacks all point back to various code points where we are
> trying to set the shape of an array, e.g.,
> 
> offsets.shape = (-1, 2)
> 
Could you give a hint what these arrays history (how it was created) and
maybe .shape/.strides is? Sounds like the array is not contiguous when
it is expected to be, or the attribute setting itself fails in some
corner cases on master?

Regards,

Sebastian

> Those lines haven't changed in a couple of years, and was intended to
> be done this way to raise an error when reshaping would result in a
> copy (since we needed to use the original in those places).  I don't
> know how these arrays have become non-contiguous, so I am wondering if
> there was some sort of attribute that got screwed up somewhere (maybe
> with views?)
> 
> Cheers!
> Ben Root
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion




More information about the NumPy-Discussion mailing list