[Numpy-discussion] Proposed change to average function
Tue Mar 18 21:14:34 CDT 2008
In the process of addressing tickets for the next release, Charles Harris
and I made some changes to the internals of the average function which also
affects which input are accepted as valid.
According to the current documentation, weights can either be 1D or any
shape that can be broadcasted to a's shape. It seems, though, that the
broadcasting was partially broken. After some thought, we are proposing that
average only accepts weights that are either
- 1D with length equal to a's shape along axis.
- the same shape as a.
and raises an error otherwise. I think this reduces the risk of unexpected
results but wanted to know if anyone disagrees with the change.
The proposed version is implemented in revision 4888.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion