Skip to content

Commit fda9837

Browse files
authored
Merge pull request #1631 from IntelPython/docstring-axis-cumulative_sum
Add a note for description of `axis` in accumulation functions
2 parents 03c7615 + 654f64f commit fda9837

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dpctl/tensor/_accumulation.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ def cumulative_sum(
271271
axis (Optional[int, Tuple[int, ...]]):
272272
axis along which cumulative sum must be computed.
273273
If `None`, the sum is computed over the entire array.
274+
If `x` is a one-dimensional array, providing an `axis` is optional;
275+
however, if `x` has more than one dimension, providing an `axis`
276+
is required.
274277
Default: `None`.
275278
dtype (Optional[dtype]):
276279
data type of the returned array. If `None`, the default data
@@ -342,6 +345,9 @@ def cumulative_prod(
342345
axis (Optional[int, Tuple[int, ...]]):
343346
axis along which cumulative product must be computed.
344347
If `None`, the product is computed over the entire array.
348+
If `x` is a one-dimensional array, providing an `axis` is optional;
349+
however, if `x` has more than one dimension, providing an `axis`
350+
is required.
345351
Default: `None`.
346352
dtype (Optional[dtype]):
347353
data type of the returned array. If `None`, the default data
@@ -414,6 +420,9 @@ def cumulative_logsumexp(
414420
axis (Optional[int, Tuple[int, ...]]):
415421
axis along which cumulative logsumexp must be computed.
416422
If `None`, the logsumexp is computed over the entire array.
423+
If `x` is a one-dimensional array, providing an `axis` is optional;
424+
however, if `x` has more than one dimension, providing an `axis`
425+
is required.
417426
Default: `None`.
418427
dtype (Optional[dtype]):
419428
data type of the returned array. If `None`, the default data

0 commit comments

Comments
 (0)