You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calculates an implementation-dependent approximation to the sine, having domain ``(-infinity, +infinity)`` and codomain ``[-1, +1]``, for each element ``x_i`` of the input array ``x``. Each element ``x_i`` is assumed to be expressed in radians.
1293
+
r"""
1294
+
Calculates an implementation-dependent approximation to the sine for each element ``x_i`` of the input array ``x``.
1295
+
1296
+
Each element ``x_i`` is assumed to be expressed in radians.
1295
1297
1296
1298
**Special cases**
1297
1299
1298
-
For floating-point operands,
1300
+
For real-valued floating-point operands,
1299
1301
1300
1302
- If ``x_i`` is ``NaN``, the result is ``NaN``.
1301
1303
- If ``x_i`` is ``+0``, the result is ``+0``.
1302
1304
- If ``x_i`` is ``-0``, the result is ``-0``.
1303
1305
- If ``x_i`` is either ``+infinity`` or ``-infinity``, the result is ``NaN``.
1304
1306
1307
+
For complex floating-point operands, special cases must be handled as if the operation is implemented as ``-1j * sinh(x*1j)``.
1308
+
1309
+
.. note::
1310
+
The sine is an entire function on the complex plane and has no branch cuts.
1311
+
1312
+
.. note::
1313
+
For complex arguments, the mathematical definition of sine is
where :math:`\operatorname{sinh}` is the hyperbolic sine.
1319
+
1305
1320
Parameters
1306
1321
----------
1307
1322
x: array
1308
-
input array whose elements are each expressed in radians. Should have a real-valued floating-point data type.
1323
+
input array whose elements are each expressed in radians. Should have a floating-point data type.
1309
1324
1310
1325
Returns
1311
1326
-------
1312
1327
out: array
1313
-
an array containing the sine of each element in ``x``. The returned array must have a real-valued floating-point data type determined by :ref:`type-promotion`.
1328
+
an array containing the sine of each element in ``x``. The returned array must have a floating-point data type determined by :ref:`type-promotion`.
0 commit comments