@@ -109,17 +109,18 @@ def _get_accumulation_res_dt(a, dtype):
109
109
110
110
111
111
_ACOS_DOCSTRING = r"""
112
- Computes inverse cosine for each element `x_i` for input array `x`.
112
+ Computes inverse cosine for each element :math: `x_i` for input array `x`.
113
113
114
- The inverse of :obj:`dpnp.cos` so that, if ``y = cos(x)``, then ``x = arccos(y)``.
115
- Note that :obj:`dpnp.acos` is an alias of :obj:`dpnp.arccos`.
114
+ The inverse of :obj:`dpnp.cos` so that, if :math:`y = cos(x)`, then
115
+ :math:`x = acos(y)`. Note that :obj:`dpnp.arccos` is an alias of
116
+ :obj:`dpnp.acos`.
116
117
117
- For full documentation refer to :obj:`numpy.arccos `.
118
+ For full documentation refer to :obj:`numpy.acos `.
118
119
119
120
Parameters
120
121
----------
121
122
x : {dpnp.ndarray, usm_ndarray}
122
- Input array, expected to have numeric data type.
123
+ Input array, expected to have a floating-point data type.
123
124
out : {None, dpnp.ndarray, usm_ndarray}, optional
124
125
Output array to populate.
125
126
Array must have the correct shape and the expected data type.
@@ -133,9 +134,9 @@ def _get_accumulation_res_dt(a, dtype):
133
134
Returns
134
135
-------
135
136
out : dpnp.ndarray
136
- An array containing the element-wise inverse cosine, in radians
137
- and in the closed interval `[-pi/2 , pi/2 ]`. The data type
138
- of the returned array is determined by the Type Promotion Rules.
137
+ An array containing the element-wise inverse cosine, in radians and in the
138
+ closed interval :math:`[0 , pi]`. The data type of the returned array is
139
+ determined by the Type Promotion Rules.
139
140
140
141
Limitations
141
142
-----------
@@ -152,39 +153,40 @@ def _get_accumulation_res_dt(a, dtype):
152
153
153
154
Notes
154
155
-----
155
- :obj:`dpnp.arccos ` is a multivalued function: for each `x` there are infinitely
156
- many numbers `z` such that `` cos(z) = x` `. The convention is to return the
157
- angle `z` whose real part lies in `[0, pi]`.
156
+ :obj:`dpnp.acos ` is a multivalued function: for each `x` there are infinitely
157
+ many numbers `z` such that :math:` cos(z) = x`. The convention is to return the
158
+ angle `z` whose real part lies in :math: `[0, pi]`.
158
159
159
- For real-valued input data types, :obj:`dpnp.arccos ` always returns real output.
160
- For each value that cannot be expressed as a real number or infinity, it yields
161
- ``nan ``.
160
+ For real-valued floating-point input data types, :obj:`dpnp.acos ` always
161
+ returns real output. For each value that cannot be expressed as a real number
162
+ or infinity, it yields ``NaN ``.
162
163
163
- For complex-valued input, :obj:`dpnp.arccos` is a complex analytic function that
164
- has, by convention, the branch cuts `[-inf, -1]` and `[1, inf]` and is continuous
165
- from above on the former and from below on the latter.
164
+ For complex floating-point input data types, :obj:`dpnp.acos` is a complex
165
+ analytic function that has, by convention, the branch cuts :math:`[-inf, -1]`
166
+ and :math:`[1, inf]` and is continuous from above on the former and from below
167
+ on the latter.
166
168
167
- The inverse cos is also known as :math:`acos ` or :math:`cos^{-1}`.
169
+ The inverse cosine is also known as :math:`arccos ` or :math:`cos^{-1}`.
168
170
169
171
Examples
170
172
--------
171
173
>>> import dpnp as np
172
174
>>> x = np.array([1, -1])
173
- >>> np.arccos (x)
175
+ >>> np.acos (x)
174
176
array([0.0, 3.14159265])
175
177
176
178
"""
177
179
178
- arccos = DPNPUnaryFunc (
179
- "arccos " ,
180
+ acos = DPNPUnaryFunc (
181
+ "acos " ,
180
182
ti ._acos_result_type ,
181
183
ti ._acos ,
182
184
_ACOS_DOCSTRING ,
183
185
mkl_fn_to_call = "_mkl_acos_to_call" ,
184
186
mkl_impl_fn = "_acos" ,
185
187
)
186
188
187
- acos = arccos # acos is an alias for arccos
189
+ arccos = acos # arccos is an alias for acos
188
190
189
191
190
192
_ACOSH_DOCSTRING = r"""
@@ -553,7 +555,7 @@ def _get_accumulation_res_dt(a, dtype):
553
555
Limitations
554
556
-----------
555
557
Parameters `where` and `subok` are supported with their default values.
556
- Keyword arguments `kwargs` are currently unsupported.
558
+ Keyword argument `kwargs` is currently unsupported.
557
559
Otherwise ``NotImplementedError`` exception will be raised.
558
560
559
561
See Also
@@ -1335,6 +1337,7 @@ def cumlogsumexp(
1335
1337
Limitations
1336
1338
-----------
1337
1339
Parameters `where` and `subok` are supported with their default values.
1340
+ Keyword argument `kwargs` is currently unsupported.
1338
1341
Otherwise ``NotImplementedError`` exception will be raised.
1339
1342
1340
1343
See Also
@@ -1592,7 +1595,7 @@ def cumlogsumexp(
1592
1595
Limitations
1593
1596
-----------
1594
1597
Parameters `where` and `subok` are supported with their default values.
1595
- Keyword arguments `kwargs` are currently unsupported.
1598
+ Keyword argument `kwargs` is currently unsupported.
1596
1599
Otherwise ``NotImplementedError`` exception will be raised.
1597
1600
1598
1601
See Also
@@ -1669,7 +1672,7 @@ def cumlogsumexp(
1669
1672
Limitations
1670
1673
-----------
1671
1674
Parameters `where` and `subok` are supported with their default values.
1672
- Keyword arguments `kwargs` are currently unsupported.
1675
+ Keyword argument `kwargs` is currently unsupported.
1673
1676
Otherwise ``NotImplementedError`` exception will be raised.
1674
1677
1675
1678
See Also
@@ -2181,6 +2184,7 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2181
2184
2182
2185
Limitations
2183
2186
-----------
2187
+ Parameters `where` and `subok` are supported with their default values.
2184
2188
Keyword argument `kwargs` is currently unsupported.
2185
2189
Otherwise ``NotImplementedError`` exception will be raised.
2186
2190
@@ -2239,6 +2243,7 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2239
2243
Limitations
2240
2244
-----------
2241
2245
Parameters `where` and `subok` are supported with their default values.
2246
+ Keyword argument `kwargs` is currently unsupported.
2242
2247
Otherwise ``NotImplementedError`` exception will be raised.
2243
2248
2244
2249
See Also
@@ -2297,6 +2302,7 @@ def reduce_hypot(x, /, *, axis=None, dtype=None, keepdims=False, out=None):
2297
2302
Limitations
2298
2303
-----------
2299
2304
Parameters `where` and `subok` are supported with their default values.
2305
+ Keyword argument `kwargs` is currently unsupported.
2300
2306
Otherwise ``NotImplementedError`` exception will be raised.
2301
2307
2302
2308
See Also
0 commit comments