Skip to content

Commit 9c6f67d

Browse files
committed
Fixed docstrings for log10 and log2
1 parent d59f6c0 commit 9c6f67d

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

dpctl/tensor/_elementwise_funcs.py

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -565,19 +565,23 @@
565565
# U22: ==== LOG2 (x)
566566
_log2_docstring_ = """
567567
log2(x, out=None, order='K')
568-
Computes the base 2 logarithm element-wise.
568+
569+
Computes the base-2 logarithm for each element `x_i` of input array `x`.
570+
569571
Args:
570572
x (usm_ndarray):
571573
Input array, expected to have numeric data type.
572-
out (usm_ndarray):
573-
Output array to populate. Array must have the correct
574-
shape and the expected data type.
575-
order ("C","F","A","K", optional): memory layout of the new
576-
output array, if parameter `out` is `None`.
574+
out ({None, usm_ndarray}, optional):
575+
Output array to populate.
576+
Array have the correct shape and the expected data type.
577+
order ("C","F","A","K", optional):
578+
Memory layout of the newly output array, if parameter `out` is `None`.
577579
Default: "K".
578-
Return:
579-
usm_ndarray:
580-
An array containing the element-wise base 2 logarithm values.
580+
Returns:
581+
usm_narray:
582+
An array containing the base-2 logarithm of `x`.
583+
The data type of the returned array is determined by the
584+
Type Promotion Rules.
581585
"""
582586

583587
log2 = UnaryElementwiseFunc(
@@ -587,19 +591,23 @@
587591
# U23: ==== LOG10 (x)
588592
_log10_docstring_ = """
589593
log10(x, out=None, order='K')
590-
Computes the base 10 logarithm element-wise.
594+
595+
Computes the base-10 logarithm for each element `x_i` of input array `x`.
596+
591597
Args:
592598
x (usm_ndarray):
593599
Input array, expected to have numeric data type.
594-
out (usm_ndarray):
595-
Output array to populate. Array must have the correct
596-
shape and the expected data type.
597-
order ("C","F","A","K", optional): memory layout of the new
598-
output array, if parameter `out` is `None`.
600+
out ({None, usm_ndarray}, optional):
601+
Output array to populate.
602+
Array have the correct shape and the expected data type.
603+
order ("C","F","A","K", optional):
604+
Memory layout of the newly output array, if parameter `out` is `None`.
599605
Default: "K".
600-
Return:
601-
usm_ndarray:
602-
An array containing the element-wise base 10 logarithm values.
606+
Returns:
607+
usm_narray:
608+
An array containing the base-1- logarithm of `x`.
609+
The data type of the returned array is determined by the
610+
Type Promotion Rules.
603611
"""
604612

605613
log10 = UnaryElementwiseFunc(

0 commit comments

Comments
 (0)