Skip to content

Commit e67061b

Browse files
committed
Fix warning when generating documentation caused by diff docstring
1 parent f0f7837 commit e67061b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

dpctl/tensor/_utility_functions.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ def _boolean_reduction(x, axis, keepdims, func):
104104

105105

106106
def all(x, /, *, axis=None, keepdims=False):
107-
"""all(x, axis=None, keepdims=False)
107+
"""
108+
all(x, axis=None, keepdims=False)
108109
109110
Tests whether all input array elements evaluate to True along a given axis.
110111
@@ -132,7 +133,8 @@ def all(x, /, *, axis=None, keepdims=False):
132133

133134

134135
def any(x, /, *, axis=None, keepdims=False):
135-
"""any(x, axis=None, keepdims=False)
136+
"""
137+
any(x, axis=None, keepdims=False)
136138
137139
Tests whether any input array elements evaluate to True along a given axis.
138140
@@ -176,9 +178,11 @@ def _validate_diff_shape(sh1, sh2, axis):
176178

177179

178180
def _concat_diff_input(arr, axis, prepend, append):
179-
"""Concatenates `arr`, `prepend` and, `append` along `axis`,
181+
"""
182+
Concatenates `arr`, `prepend` and, `append` along `axis`,
180183
where `arr` is an array and `prepend` and `append` are
181-
any mixture of arrays and scalars."""
184+
any mixture of arrays and scalars.
185+
"""
182186
if prepend is not None and append is not None:
183187
q1, x_usm_type = arr.sycl_queue, arr.usm_type
184188
q2, prepend_usm_type = _get_queue_usm_type(prepend)
@@ -441,7 +445,8 @@ def diff(x, /, *, axis=-1, n=1, prepend=None, append=None):
441445
usm_ndarray:
442446
an array containing the `n`-th differences. The array will have the
443447
same shape as `x`, except along `axis`, which will have shape:
444-
prepend.shape[axis] + x.shape[axis] + append.shape[axis] - n
448+
``prepend.shape[axis] + x.shape[axis] + append.shape[axis] - n``
449+
445450
The data type of the returned array is determined by the Type
446451
Promotion Rules.
447452
"""

0 commit comments

Comments
 (0)