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
- If ``N`` is ``0``, the product is `1` (i.e., the empty product).
103
103
104
-
For floating-point operands,
105
-
106
-
- If ``x_i`` is ``NaN``, the product is ``NaN`` (i.e., ``NaN`` values propagate).
104
+
For both real-valued and complex floating-point operands, special cases must be handled as if the operation is implemented by successive application of :func:`~array_api.multiply`.
107
105
108
106
Parameters
109
107
----------
110
108
x: array
111
-
input array. Should have a real-valued data type.
109
+
input array. Should have a numeric data type.
112
110
axis: Optional[Union[int, Tuple[int, ...]]]
113
111
axis or axes along which products must be computed. By default, the product must be computed over the entire array. If a tuple of integers, products must be computed over multiple axes. Default: ``None``.
114
112
dtype: Optional[dtype]
115
113
data type of the returned array. If ``None``,
116
114
117
-
- if the default data type corresponding to the data type "kind" (integer or floating-point) of ``x`` has a smaller range of values than the data type of ``x`` (e.g., ``x`` has data type ``int64`` and the default data type is ``int32``, or ``x`` has data type ``uint64`` and the default data type is ``int64``), the returned array must have the same data type as ``x``.
115
+
- if the default data type corresponding to the data type "kind" (integer, real-valued floating-point, or complex floating-point) of ``x`` has a smaller range of values than the data type of ``x`` (e.g., ``x`` has data type ``int64`` and the default data type is ``int32``, or ``x`` has data type ``uint64`` and the default data type is ``int64``), the returned array must have the same data type as ``x``.
118
116
- if ``x`` has a real-valued floating-point data type, the returned array must have the default real-valued floating-point data type.
117
+
- if ``x`` has a complex floating-point data type, the returned array must have the default complex floating-point data type.
119
118
- if ``x`` has a signed integer data type (e.g., ``int16``), the returned array must have the default integer data type.
120
119
- if ``x`` has an unsigned integer data type (e.g., ``uint16``), the returned array must have an unsigned integer data type having the same number of bits as the default integer data type (e.g., if the default integer data type is ``int32``, the returned array must have a ``uint32`` data type).
0 commit comments