[Numpy-discussion] Broadcasting rules (Ticket 76).

tim.hochberg at cox.net tim.hochberg at cox.net
Tue Apr 25 14:24:03 CDT 2006

---- Travis Oliphant <oliphant.travis at ieee.org> wrote: 
> Sasha wrote:
> > In this category, I would suggest to allow broadcasting to any
> > multiple of the dimension even if the dimension is not 1.  I don't see
> > what makes 1 so special.
> >   
> What's so special about 1 is that the code for it is relatively 
> straightforward and already implemented using strides.  Altering the 
> code to allow any multiple of the dimension would be harder and slower. 

It also does the right thing most of the time and is easy to understand. It's my expectation that oppening up broadcasting will be more effective in masking errors than in enabling useful new behaviour.

I think that's my ticket being discussed here. If so, it was motivated by a case that stopped working because the looser broadcasting behaviour was preventing some other broadcasting from taking place. I'm not home right now, so I can't provide details; I'll do that on Thursday.

Just keep in mind that it's much easier to keep the broadcasting rules restrictive for now and loosen them up later than to try to tighten them up later if loosening them up turns out to not be a good idea.


More information about the Numpy-discussion mailing list