[Numpy-discussion] another broadcast/fancy indexing question
Tue Jul 10 17:00:17 CDT 2007
On 7/10/07, Mark.Miller <email@example.com> wrote:
> Sorry...can you clarify? I think that some of your message got cut off.
> 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:
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
> > --
> > . __
> > . |-\
> > .
> Numpy-discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion