diff options
author | madhulikajc <53166646+madhulikajc@users.noreply.github.com> | 2020-10-17 06:58:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-17 15:58:33 +0200 |
commit | 7b0a764fee6e1614f3249e9082d8c4acf1dc62d5 (patch) | |
tree | 40a1010555bb50448d16a63186235453a694efb4 /numpy/array_api/_array_object.py | |
parent | 2ce4ab4063457f558e5aab1051aedc68ea17eb25 (diff) | |
download | numpy-7b0a764fee6e1614f3249e9082d8c4acf1dc62d5.tar.gz |
ENH: add function to get broadcast shape from a given set of shapes. (#17535)
* ENH: add function to get broadcast shape from a given set of shapes.
Add new function numpy.broadcast_shape which takes tuples
for the shapes to be broadcast against each other.
Return the broadcasted shape as a tuple.
See #17217
* Perform array allocations of size 0 for provided shape tuples
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* Test for int as input shape
Also update docstring to include both ints and tuples of ints as input
* Remove unnecessary array_function_dispatch
* Add missing set_module
* Add release notes. Add versionadded to docstring.
Also fix up docstring details.
* follow convention for trailing comma
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* Change name to broadcast_shapes. Also add test case, and type hint.
* follow convention
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* Update docstring
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* Add reference to numpy docs on broadcasting to docstring
Also move versionadded
* Fix spelling
Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com>
* Add broadcast_shapes to reference docs and add See Also sections
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com>
Diffstat (limited to 'numpy/array_api/_array_object.py')
0 files changed, 0 insertions, 0 deletions