You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Broadcasts one or more shapes against one another.
41
+
42
+
Parameters
43
+
----------
44
+
shapes: Tuple[int, ...]
45
+
an arbitrary number of to-be broadcasted shapes.
46
+
47
+
Returns
48
+
-------
49
+
out: Tuple[int, ...]
50
+
a broadcasted shape.
51
+
52
+
Raises
53
+
------
54
+
ValueError
55
+
If provided shapes which are not broadcast compatible (see :ref:`broadcasting`), a ``ValueError`` **should** be raised.
56
+
57
+
Notes
58
+
-----
59
+
60
+
- If not provided one or more arguments, the function **must** return an empty tuple.
61
+
62
+
.. note::
63
+
Array libraries which build computation graphs (e.g., ndonnx and Dask) commonly support shapes having dimensions of unknown size. If a shape contains a value other than an integer (e.g., ``None`` for a dimension of unknown size), behavior is unspecified and thus implementation-defined. Array-conforming libraries **may** choose to propagate such values (e.g., if a shape contains a dimension size of ``None``, the returned broadcasted shape also has a corresponding dimension having a size equal to ``None``) or raise an exception.