From 654f64f5e468a43f0f30f2cb750761586395ac16 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Wed, 3 Apr 2024 11:23:43 +0200 Subject: [PATCH] Add a note for axis description in accumulation functions --- dpctl/tensor/_accumulation.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dpctl/tensor/_accumulation.py b/dpctl/tensor/_accumulation.py index 5232740b4f..c7b104aef6 100644 --- a/dpctl/tensor/_accumulation.py +++ b/dpctl/tensor/_accumulation.py @@ -271,6 +271,9 @@ def cumulative_sum( axis (Optional[int, Tuple[int, ...]]): axis along which cumulative sum must be computed. If `None`, the sum is computed over the entire array. + If `x` is a one-dimensional array, providing an `axis` is optional; + however, if `x` has more than one dimension, providing an `axis` + is required. Default: `None`. dtype (Optional[dtype]): data type of the returned array. If `None`, the default data @@ -342,6 +345,9 @@ def cumulative_prod( axis (Optional[int, Tuple[int, ...]]): axis along which cumulative product must be computed. If `None`, the product is computed over the entire array. + If `x` is a one-dimensional array, providing an `axis` is optional; + however, if `x` has more than one dimension, providing an `axis` + is required. Default: `None`. dtype (Optional[dtype]): data type of the returned array. If `None`, the default data @@ -414,6 +420,9 @@ def cumulative_logsumexp( axis (Optional[int, Tuple[int, ...]]): axis along which cumulative logsumexp must be computed. If `None`, the logsumexp is computed over the entire array. + If `x` is a one-dimensional array, providing an `axis` is optional; + however, if `x` has more than one dimension, providing an `axis` + is required. Default: `None`. dtype (Optional[dtype]): data type of the returned array. If `None`, the default data