|
119 | 119 | "acosh", ti._acosh_result_type, ti._acosh, _acosh_docstring |
120 | 120 | ) |
121 | 121 | del _acosh_docstring |
| 122 | + |
| 123 | +# U04: ===== ASIN (x) |
| 124 | +_asin_docstring = r""" |
| 125 | +asin(x, /, \*, out=None, order='K') |
| 126 | +
|
| 127 | +Computes inverse sine for each element `x_i` for input array `x`. |
| 128 | +
|
| 129 | +Args: |
| 130 | + x (usm_ndarray): |
| 131 | + Input array, expected to have a floating-point data type. |
| 132 | + out (Union[usm_ndarray, None], optional): |
| 133 | + Output array to populate. |
| 134 | + Array must have the correct shape and the expected data type. |
| 135 | + order ("C","F","A","K", optional): |
| 136 | + Memory layout of the new output array, if parameter |
| 137 | + `out` is ``None``. |
| 138 | + Default: "K". |
| 139 | +
|
| 140 | +Returns: |
| 141 | + usm_ndarray: |
| 142 | + An array containing the element-wise inverse sine, in radians |
| 143 | + and in the closed interval :math:`[-\pi/2, \pi/2]`. The data type |
| 144 | + of the returned array is determined by the Type Promotion Rules. |
| 145 | +""" |
| 146 | + |
| 147 | +asin = UnaryElementwiseFunc( |
| 148 | + "asin", ti._asin_result_type, ti._asin, _asin_docstring |
| 149 | +) |
| 150 | +del _asin_docstring |
| 151 | + |
| 152 | +# U05: ===== ASINH (x) |
| 153 | +_asinh_docstring = r""" |
| 154 | +asinh(x, /, \*, out=None, order='K') |
| 155 | +
|
| 156 | +Computes inverse hyperbolic sine for each element `x_i` for input array `x`. |
| 157 | +
|
| 158 | +Args: |
| 159 | + x (usm_ndarray): |
| 160 | + Input array, expected to have a floating-point data type. |
| 161 | + out (Union[usm_ndarray, None], optional): |
| 162 | + Output array to populate. |
| 163 | + Array must have the correct shape and the expected data type. |
| 164 | + order ("C","F","A","K", optional): |
| 165 | + Memory layout of the new output array, if parameter |
| 166 | + `out` is ``None``. |
| 167 | + Default: "K". |
| 168 | +
|
| 169 | +Returns: |
| 170 | + usm_ndarray: |
| 171 | + An array containing the element-wise inverse hyperbolic sine, in |
| 172 | + radians. The data type of the returned array is determined by |
| 173 | + the Type Promotion Rules. |
| 174 | +""" |
| 175 | + |
| 176 | +asinh = UnaryElementwiseFunc( |
| 177 | + "asinh", ti._asinh_result_type, ti._asinh, _asinh_docstring |
| 178 | +) |
| 179 | +del _asinh_docstring |
| 180 | + |
| 181 | +# U43: ==== ANGLE (x) |
| 182 | +_angle_docstring = r""" |
| 183 | +angle(x, /, \*, out=None, order='K') |
| 184 | +
|
| 185 | +Computes the phase angle (also called the argument) of each element `x_i` for |
| 186 | +input array `x`. |
| 187 | +
|
| 188 | +Args: |
| 189 | + x (usm_ndarray): |
| 190 | + Input array, expected to have a complex floating-point data type. |
| 191 | + out (Union[usm_ndarray, None], optional): |
| 192 | + Output array to populate. |
| 193 | + Array have the correct shape and the expected data type. |
| 194 | + order ("C","F","A","K", optional): |
| 195 | + Memory layout of the new output array, if parameter |
| 196 | + `out` is ``None``. |
| 197 | + Default: "K". |
| 198 | +
|
| 199 | +Returns: |
| 200 | + usm_ndarray: |
| 201 | + An array containing the element-wise phase angles. |
| 202 | + The returned array has a floating-point data type determined |
| 203 | + by the Type Promotion Rules. |
| 204 | +""" |
| 205 | + |
| 206 | +angle = UnaryElementwiseFunc( |
| 207 | + "angle", |
| 208 | + ti._angle_result_type, |
| 209 | + ti._angle, |
| 210 | + _angle_docstring, |
| 211 | +) |
| 212 | +del _angle_docstring |
| 213 | + |
| 214 | +del ti |
0 commit comments