Hello all, I opened a PR to add a function which returns the broadcasted shape from a given set of shapes: https://github.com/numpy/numpy/pull/17535As this is a proposed change to the API, I wanted to see if there was any feedback from the list. Thanks so much, Madhulika _______________________________________________ NumPy-Discussion mailing list [hidden email] https://mail.python.org/mailman/listinfo/numpy-discussion |
On 10/15/20, Madhulika Jain Chambers <[hidden email]> wrote:
> Hello all, > > I opened a PR to add a function which returns the broadcasted shape from a > given set of shapes: > https://github.com/numpy/numpy/pull/17535 > > As this is a proposed change to the API, I wanted to see if there was any > feedback from the list. Thanks, this is useful! I've implemented something similar many times over the years, and could have used it in some SciPy code, where we currently have a private implementation in one of the `stats` modules. Warren > > Thanks so much, > > Madhulika > _______________________________________________ NumPy-Discussion mailing list [hidden email] https://mail.python.org/mailman/listinfo/numpy-discussion |
On Thu, Oct 15, 2020 at 11:46 AM Warren Weckesser <[hidden email]> wrote: On 10/15/20, Madhulika Jain Chambers <[hidden email]> wrote: +1 for adding this. There's a version of this helper function -- coincidentally with the exactly same API and name -- in JAX, too: _______________________________________________ NumPy-Discussion mailing list [hidden email] https://mail.python.org/mailman/listinfo/numpy-discussion |
There is at least one custom implementation in `Generator` IIRC, so a formal API addition sounds like a good idea. Kevin On Thu, Oct 15, 2020 at 8:52 PM Stephan Hoyer <[hidden email]> wrote:
_______________________________________________ NumPy-Discussion mailing list [hidden email] https://mail.python.org/mailman/listinfo/numpy-discussion |
Free forum by Nabble | Edit this page |