@@ -774,8 +774,8 @@ def _get_accumulation_res_dt(a, dtype):
774774Returns
775775-------
776776out : dpnp.ndarray
777- An array containing the element-wise cosine. The data type of the returned
778- array is determined by the Type Promotion Rules.
777+ An array containing the element-wise cosine, in radians . The data type of
778+ the returned array is determined by the Type Promotion Rules.
779779
780780Limitations
781781-----------
@@ -2269,8 +2269,8 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
22692269Returns
22702270-------
22712271out : dpnp.ndarray
2272- An array containing the element-wise sine. The data type of the returned
2273- array is determined by the Type Promotion Rules.
2272+ An array containing the element-wise sine, in radians . The data type of the
2273+ returned array is determined by the Type Promotion Rules.
22742274
22752275Limitations
22762276-----------
@@ -2441,14 +2441,14 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
24412441
24422442
24432443_SQUARE_DOCSTRING = r"""
2444- Squares each element `x_i` of input array `x`.
2444+ Squares each element :math: `x_i` of input array `x`.
24452445
24462446For full documentation refer to :obj:`numpy.square`.
24472447
24482448Parameters
24492449----------
24502450x : {dpnp.ndarray, usm_ndarray}
2451- Input array.
2451+ Input array, expected to have a boolean or numeric data type .
24522452out : {None, dpnp.ndarray, usm_ndarray}, optional
24532453 Output array to populate.
24542454 Array must have the correct shape and the expected data type.
@@ -2462,8 +2462,8 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
24622462Returns
24632463-------
24642464out : dpnp.ndarray
2465- An array containing the element-wise squares of `x`. The data type of
2466- the returned array is determined by the Type Promotion Rules.
2465+ An array containing the element-wise squares of `x`. The data type of the
2466+ returned array is determined by the Type Promotion Rules.
24672467
24682468Limitations
24692469-----------
@@ -2473,11 +2473,11 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
24732473
24742474See Also
24752475--------
2476- :obj:`dpnp..linalg.matrix_power` : Raise a square matrix
2477- to the (integer) power `n`.
2476+ :obj:`dpnp..linalg.matrix_power` : Raise a square matrix to the (integer)
2477+ power `n`.
24782478:obj:`dpnp.sqrt` : Calculate :math:`\sqrt{x}`, element-wise.
2479- :obj:`dpnp.power` : First array elements raised to powers
2480- from second array, element-wise.
2479+ :obj:`dpnp.power` : Exponentiation by raising the first array to the power of
2480+ the second array, element-wise.
24812481
24822482Examples
24832483--------
@@ -2499,14 +2499,14 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
24992499
25002500
25012501_TAN_DOCSTRING = """
2502- Computes tangent for each element `x_i` for input array `x`.
2502+ Computes the tangent for each element :math: `x_i` for input array `x`.
25032503
25042504For full documentation refer to :obj:`numpy.tan`.
25052505
25062506Parameters
25072507----------
25082508x : {dpnp.ndarray, usm_ndarray}
2509- Input array, expected to have numeric data type.
2509+ Input array, expected to have a floating-point data type.
25102510out : {None, dpnp.ndarray, usm_ndarray}, optional
25112511 Output array to populate.
25122512 Array must have the correct shape and the expected data type.
@@ -2520,8 +2520,8 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
25202520Returns
25212521-------
25222522out : dpnp.ndarray
2523- An array containing the element-wise tangent. The data type
2524- of the returned array is determined by the Type Promotion Rules.
2523+ An array containing the element-wise tangent, in radians . The data type of
2524+ the returned array is determined by the Type Promotion Rules.
25252525
25262526Limitations
25272527-----------
@@ -2531,7 +2531,7 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
25312531
25322532See Also
25332533--------
2534- :obj:`dpnp.arctan ` : Trigonometric inverse tangent, element-wise.
2534+ :obj:`dpnp.atan ` : Trigonometric inverse tangent, element-wise.
25352535:obj:`dpnp.sin` : Trigonometric sine, element-wise.
25362536:obj:`dpnp.cos` : Trigonometric cosine, element-wise.
25372537:obj:`dpnp.tanh` : Hyperbolic tangent, element-wise.
@@ -2555,15 +2555,21 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
25552555)
25562556
25572557
2558- _TANH_DOCSTRING = """
2559- Computes hyperbolic tangent for each element `x_i` for input array `x`.
2558+ _TANH_DOCSTRING = r"""
2559+ Computes the hyperbolic tangent for each element :math:`x_i` for input array
2560+ `x`.
2561+
2562+ The mathematical definition of the hyperbolic tangent is
2563+
2564+ .. math::
2565+ \operatorname{tanh}(x) = \frac{\operatorname{sinh}(x)}{\operatorname{cosh}(x)}
25602566
25612567For full documentation refer to :obj:`numpy.tanh`.
25622568
25632569Parameters
25642570----------
25652571x : {dpnp.ndarray, usm_ndarray}
2566- Input array, expected to have numeric data type.
2572+ Input array, expected to have a floating-point data type.
25672573out : {None, dpnp.ndarray, usm_ndarray}, optional
25682574 Output array to populate.
25692575 Array must have the correct shape and the expected data type.
@@ -2577,8 +2583,8 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
25772583Returns
25782584-------
25792585out : dpnp.ndarray
2580- An array containing the element-wise hyperbolic tangent. The data type
2581- of the returned array is determined by the Type Promotion Rules.
2586+ An array containing the element-wise hyperbolic tangent. The data type of
2587+ the returned array is determined by the Type Promotion Rules.
25822588
25832589Limitations
25842590-----------
@@ -2588,7 +2594,7 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
25882594
25892595See Also
25902596--------
2591- :obj:`dpnp.arctanh ` : Hyperbolic inverse tangent, element-wise.
2597+ :obj:`dpnp.atanh ` : Hyperbolic inverse tangent, element-wise.
25922598:obj:`dpnp.sinh` : Hyperbolic sine, element-wise.
25932599:obj:`dpnp.cosh` : Hyperbolic cosine, element-wise.
25942600:obj:`dpnp.tan` : Trigonometric tangent, element-wise.
@@ -2617,8 +2623,9 @@ def unwrap(p, discont=None, axis=-1, *, period=2 * dpnp.pi):
26172623 Unwrap by taking the complement of large deltas with respect to the period.
26182624
26192625 This unwraps a signal `p` by changing elements which have an absolute
2620- difference from their predecessor of more than ``max(discont, period / 2)``
2621- to their `period`-complementary values.
2626+ difference from their predecessor of more than
2627+ :math:`\max(discont, \frac{period}{2})` to their `period`-complementary
2628+ values.
26222629
26232630 For the default case where `period` is :math:`2\pi` and `discont` is
26242631 :math:`\pi`, this unwraps a radian phase `p` such that adjacent differences
@@ -2633,16 +2640,19 @@ def unwrap(p, discont=None, axis=-1, *, period=2 * dpnp.pi):
26332640 Input array.
26342641 discont : {float, None}, optional
26352642 Maximum discontinuity between values, default is ``None`` which is an
2636- alias for ``period / 2``. Values below ``period / 2`` are treated as if
2637- they were ``period / 2``. To have an effect different from the default,
2638- `discont` should be larger than ``period / 2``.
2643+ alias for :math:`\frac{period}{2}`. Values below
2644+ :math:`\frac{period}{2}` are treated as if they were
2645+ :math:`\frac{period}{2}`. To have an effect different from the default,
2646+ `discont` should be larger than :math:`\frac{period}{2}`.
26392647
26402648 Default: ``None``.
26412649 axis : int, optional
26422650 Axis along which unwrap will operate, default is the last axis.
2651+
26432652 Default: ``-1``.
26442653 period : float, optional
26452654 Size of the range over which the input wraps.
2655+
26462656 Default: ``2 * pi``.
26472657
26482658 Returns
@@ -2657,9 +2667,9 @@ def unwrap(p, discont=None, axis=-1, *, period=2 * dpnp.pi):
26572667
26582668 Notes
26592669 -----
2660- If the discontinuity in `p` is smaller than `` period / 2`` , but larger than
2661- `discont`, no unwrapping is done because taking the complement would only
2662- make the discontinuity larger.
2670+ If the discontinuity in `p` is smaller than :math:`\frac{ period}{2}` , but
2671+ larger than `discont`, no unwrapping is done because taking the complement
2672+ would only make the discontinuity larger.
26632673
26642674 Examples
26652675 --------
0 commit comments