[Numpy-discussion] Silent Broadcasting considered harmful
Sturla Molden
sturla.molden at gmail.com
Mon Feb 9 12:59:14 EST 2015
Chris Barker <chris.barker at noaa.gov> wrote:
> Do you realize that:
>
> arr = np.ones((5,))
>
> ar2 = arr * 5
>
> is broadcasting, too?
Perhaps we should only warn for a subset of broadcastings? E.g. avoid the
warning on scalar times array.
I prefer we don't warn about this though, because it might be interpreted
as if broadcasting is "undesired". A warning means something bad right?
There are just two things that can come out if this: First some stupid
package author will turn them on and cause warning mayhem everywhere.
Second, some stupid manager will decide that the NumPy code should be free
of broadcasts, and then NumPy is crippled for the developers.
Sturla
More information about the NumPy-Discussion
mailing list