@@ -694,8 +694,8 @@ def _get_accumulation_res_dt(a, dtype):
694
694
arctanh = atanh # arctanh is an alias for atanh
695
695
696
696
697
- _CBRT_DOCSTRING = """
698
- Computes positive cube-root for each element :math:`x_i` for input array `x`.
697
+ _CBRT_DOCSTRING = r """
698
+ Computes the cube-root for each element :math:`x_i` for input array `x`.
699
699
700
700
For full documentation refer to :obj:`numpy.cbrt`.
701
701
@@ -716,9 +716,8 @@ def _get_accumulation_res_dt(a, dtype):
716
716
Returns
717
717
-------
718
718
out : dpnp.ndarray
719
- An array containing the element-wise positive cube-root.
720
- The data type of the returned array is determined by the Type Promotion
721
- Rules.
719
+ An array containing the element-wise cube-root. The data type of the
720
+ returned array is determined by the Type Promotion Rules.
722
721
723
722
Limitations
724
723
-----------
@@ -728,7 +727,11 @@ def _get_accumulation_res_dt(a, dtype):
728
727
729
728
See Also
730
729
--------
731
- :obj:`dpnp.sqrt` : Return the positive square-root of an array, element-wise.
730
+ :obj:`dpnp.sqrt` : Calculate :math:`\sqrt{x}`, element-wise.
731
+
732
+ Notes
733
+ -----
734
+ This function is equivalent to :math:`\sqrt[3]{x}`, element-wise.
732
735
733
736
Examples
734
737
--------
@@ -2047,15 +2050,15 @@ def logsumexp(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2047
2050
)
2048
2051
2049
2052
2050
- _RECIPROCAL_DOCSTRING = """
2051
- Computes the reciprocal square-root for each element `x_i` for input array `x`.
2053
+ _RECIPROCAL_DOCSTRING = r """
2054
+ Computes the reciprocal for each element :math: `x_i` for input array `x`.
2052
2055
2053
2056
For full documentation refer to :obj:`numpy.reciprocal`.
2054
2057
2055
2058
Parameters
2056
2059
----------
2057
2060
x : {dpnp.ndarray, usm_ndarray}
2058
- Input array, expected to have a real-valued floating-point data type.
2061
+ Input array, expected to have a floating-point data type.
2059
2062
out : {None, dpnp.ndarray, usm_ndarray}, optional
2060
2063
Output array to populate.
2061
2064
Array must have the correct shape and the expected data type.
@@ -2069,9 +2072,8 @@ def logsumexp(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2069
2072
Returns
2070
2073
-------
2071
2074
out : dpnp.ndarray
2072
- An array containing the element-wise reciprocals.
2073
- The returned array has a floating-point data type determined
2074
- by the Type Promotion Rules.
2075
+ An array containing the element-wise reciprocals. The returned array has
2076
+ a floating-point data type determined by the Type Promotion Rules.
2075
2077
2076
2078
Limitations
2077
2079
-----------
@@ -2081,7 +2083,11 @@ def logsumexp(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2081
2083
2082
2084
See Also
2083
2085
--------
2084
- :obj:`dpnp.rsqrt` : Return the reciprocal square-root of an array, element-wise.
2086
+ :obj:`dpnp.rsqrt` : Calculate :math:`\frac{1}{\sqrt{x}}`, element-wise.
2087
+
2088
+ Notes
2089
+ -----
2090
+ This function is equivalent to :math:`\frac{1}{x}`, element-wise.
2085
2091
2086
2092
Examples
2087
2093
--------
@@ -2185,8 +2191,9 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2185
2191
)
2186
2192
2187
2193
2188
- _RSQRT_DOCSTRING = """
2189
- Computes the reciprocal square-root for each element `x_i` for input array `x`.
2194
+ _RSQRT_DOCSTRING = r"""
2195
+ Computes the reciprocal square-root for each element :math:`x_i` for input
2196
+ array `x`.
2190
2197
2191
2198
Parameters
2192
2199
----------
@@ -2204,7 +2211,7 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2204
2211
Returns
2205
2212
-------
2206
2213
out : dpnp.ndarray
2207
- An array containing the element-wise reciprocal square-root .
2214
+ An array containing the element-wise reciprocal square-roots .
2208
2215
The returned array has a floating-point data type determined by
2209
2216
the Type Promotion Rules.
2210
2217
@@ -2216,8 +2223,12 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2216
2223
2217
2224
See Also
2218
2225
--------
2219
- :obj:`dpnp.sqrt` : Return the positive square-root of an array, element-wise.
2220
- :obj:`dpnp.reciprocal` : Return the reciprocal of an array, element-wise.
2226
+ :obj:`dpnp.sqrt` : Calculate :math:`\sqrt{x}`, element-wise.
2227
+ :obj:`dpnp.reciprocal` : Calculate :math:`\frac{1}{x}`, element-wise.
2228
+
2229
+ Notes
2230
+ -----
2231
+ This function is equivalent to :math:`\frac{1}{\sqrt{x}}`, element-wise.
2221
2232
2222
2233
Examples
2223
2234
--------
@@ -2350,15 +2361,16 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2350
2361
)
2351
2362
2352
2363
2353
- _SQRT_DOCSTRING = """
2354
- Computes the positive square-root for each element `x_i` of input array `x`.
2364
+ _SQRT_DOCSTRING = r"""
2365
+ Computes the principal square-root for each element :math:`x_i` of input array
2366
+ `x`.
2355
2367
2356
2368
For full documentation refer to :obj:`numpy.sqrt`.
2357
2369
2358
2370
Parameters
2359
2371
----------
2360
2372
x : {dpnp.ndarray, usm_ndarray}
2361
- Input array.
2373
+ Input array, expected to have a floating-point data type .
2362
2374
out : {None, dpnp.ndarray, usm_ndarray}, optional
2363
2375
Output array to populate.
2364
2376
Array must have the correct shape and the expected data type.
@@ -2372,9 +2384,8 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2372
2384
Returns
2373
2385
-------
2374
2386
out : dpnp.ndarray
2375
- An array containing the element-wise positive square-roots of `x`. The
2376
- data type of the returned array is determined by the Type Promotion
2377
- Rules.
2387
+ An array containing the element-wise principal square-roots of `x`. The
2388
+ data type of the returned array is determined by the Type Promotion Rules.
2378
2389
2379
2390
Limitations
2380
2391
-----------
@@ -2384,8 +2395,23 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2384
2395
2385
2396
See Also
2386
2397
--------
2387
- :obj:`dpnp.cbrt` : Return the cube-root of an array, element-wise.
2388
- :obj:`dpnp.rsqrt` : Return the reciprocal square-root of an array, element-wise.
2398
+ :obj:`dpnp.cbrt` : Calculate :math:`\sqrt[3]{x}`, element-wise.
2399
+ :obj:`dpnp.rsqrt` : Calculate :math:`\frac{1}{\sqrt{x}}`, element-wise.
2400
+
2401
+ Notes
2402
+ -----
2403
+ This function is equivalent to :math:`\sqrt{x}`, element-wise.
2404
+
2405
+ By convention, the branch cut of the square root is the negative real axis
2406
+ :math:`(-\infty, 0)`.
2407
+
2408
+ The square root is a continuous function from above the branch cut, taking into
2409
+ account the sign of the imaginary component.
2410
+
2411
+ Accordingly, for complex arguments, the function returns the square root in the
2412
+ range of the right half-plane, including the imaginary axis (i.e., the plane
2413
+ defined by :math:`[0, +\infty)` along the real axis and
2414
+ :math:`(-\infty, +\infty)` along the imaginary axis).
2389
2415
2390
2416
Examples
2391
2417
--------
@@ -2410,7 +2436,7 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2410
2436
)
2411
2437
2412
2438
2413
- _SQUARE_DOCSTRING = """
2439
+ _SQUARE_DOCSTRING = r """
2414
2440
Squares each element `x_i` of input array `x`.
2415
2441
2416
2442
For full documentation refer to :obj:`numpy.square`.
@@ -2445,8 +2471,7 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2445
2471
--------
2446
2472
:obj:`dpnp..linalg.matrix_power` : Raise a square matrix
2447
2473
to the (integer) power `n`.
2448
- :obj:`dpnp.sqrt` : Return the positive square-root of an array,
2449
- element-wise.
2474
+ :obj:`dpnp.sqrt` : Calculate :math:`\sqrt{x}`, element-wise.
2450
2475
:obj:`dpnp.power` : First array elements raised to powers
2451
2476
from second array, element-wise.
2452
2477
0 commit comments