Skip to content

Commit

Permalink
docs: add note regarding unspecified behavior for 0d input
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Oct 31, 2024
1 parent 3b2386e commit cfe5d60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/array_api_stubs/_draft/statistical_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def cumulative_prod(
Parameters
----------
x: array
input array. Should have a numeric data type.
input array. Should have one or more dimensions (axes). Should have a numeric data type.
axis: Optional[int]
axis along which a cumulative product must be computed. If ``axis`` is negative, the function must determine the axis along which to compute a cumulative product by counting from the last dimension.
Expand Down Expand Up @@ -58,6 +58,8 @@ def cumulative_prod(
Notes
-----
- When ``x`` is a zero-dimensional array, behavior is unspecified and thus implementation-defined.
**Special Cases**
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`.
Expand Down

0 comments on commit cfe5d60

Please sign in to comment.