On 7/10/07, Mark.Miller <[EMAIL PROTECTED]> wrote:

Sorry...can you clarify?  I think that some of your message got cut off.

-Mark

Timothy Hochberg wrote:
> It's because you are using arrays as indices (aka Fancy-Indexing). When
> you do this everything works differently. In this case, everything is
> being broadcast to the same shape. As I understand it (and I try to use
> only the simplest forms of fancy indexing), what you are doing is
> equivalent to:



Sorry about that. The missing line is:

a[zeros([5,5]),:,b,c].shape

That is, your '0' is being broadcast into a 5x5 array to match the shapes of
b and c. That is why the two forms you give are not equivalent. As to why
you get that exact shape, I'd have to peruse the fancy indexing docs to
figure it out -- things are a little weird when you use multidimensional
indexing.



> --
> .  __
> .   |-\
> .
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion




--
.  __
.   |-\
.
.  [EMAIL PROTECTED]
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to