On Wed, Oct 16, 2013 at 11:39 AM, Chad Kidder <[email protected]> wrote:

> Just found what should be a bug in 1.7.1.  I'm running python(x,y) on
> windows here:
>
> >>> dataMatrix[ii,:,mask].shape
> (201, 23)
> >>> dataMatrix[ii,:,:].shape
> (23, 201)
> >>> dataMatrix.shape
> (24, 23, 201)
> >>> mask
> array([ True,  True,  True,  True,  True,  True,  True,  True,  True,
>         ...
>         True,  True,  True], dtype=bool)
>
> using a mask should not change the order of the dimensions.  Is there a
> reason for this behavior, and if so, how do I avoid it in the future?
> Thanks
>
>      --Chad Kidder
>
>
Chad,

The issue here is one where there is the mixing of fancy indexing (I
presume that is what "ii" is), slicing and boolean indexing. If I remember
correctly, the changing of the dimension orders was an inadvertent
byproduct of handing all this array accessing methods in one shot. I think
this was addressed in 1.8. Sorry for being very brief and vague, hopefully
someone else who understands what the resolution was can fill in.

Cheers!
Ben Root
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to