Hi, On Sun, Feb 8, 2015 at 1:24 PM, Stefan Reiterer <dom...@gmx.net> wrote: > I don't think this is a good comparison, especially since broadcasting is a > feature not a necessity ... > It's more like turning off/on driving assistance. > > And as already mentioned: other matrix languages also allow it, but they > warn about it's usage. > This has indeed it's merits. > Gesendet: Sonntag, 08. Februar 2015 um 22:17 Uhr > Von: "Charles R Harris" <charlesr.har...@gmail.com> > An: "Discussion of Numerical Python" <numpy-discussion@scipy.org> > Betreff: Re: [Numpy-discussion] Silent Broadcasting considered harmful > > > On Sun, Feb 8, 2015 at 2:14 PM, Stefan Reiterer <dom...@gmx.net> wrote: >> >> Yeah I'm aware of that, that's the reason why I suggested a warning level >> as an alternative. >> Setting no warnings as default would avoid breaking existing code. >> Gesendet: Sonntag, 08. Februar 2015 um 22:08 Uhr >> Von: "Eelco Hoogendoorn" <hoogendoorn.ee...@gmail.com> >> An: "Discussion of Numerical Python" <numpy-discussion@scipy.org> >> Betreff: Re: [Numpy-discussion] Silent Broadcasting considered harmful >> > I personally use Octave and/or Numpy for several years now and never >> > ever needed braodcasting. >> But since it is still there there will be many users who need it, there >> will be some use for it. >> >> Uhm, yeah, there is some use for it. Im all for explicit over implicit, >> but personally current broadcasting rules have never bothered me, certainly >> not to the extent of justifying massive backwards compatibility violations. >> Take It from someone who relies on broadcasting for every other line of >> code. >> > > > It's how numpy works. It would be like getting into your car and being > warned that it has wheels.
I agree. I knew about broadcasting as soon as I started using numpy, so I can honestly say this has never surprised me. There are other major incompatibilities between Matlab and numpy, such as 0-based indices, and array views. I think the matrix class would solve this for you, although most of us don't use that very much. It would be a major change to warn about broadcasting by default, and it would be odd, because we encourage broadcasting in our docs and common code, rightly I think. The naive user would not know to turn on this warning. I could imagine a non-default warning, but I doubt it would be much used. Cheers, Matthew _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion