# xarray.ufuncs.asin

### xarray.ufuncs.asin *= <xarray.ufuncs._unary_ufunc object>*

xarray specific variant of `numpy.asin()`. Handles xarray objects by dispatching to the appropriate function for the underlying array type.

Documentation from numpy:

Inverse sine, element-wise.

* **Parameters:**
  * **x** ([array_like](https://numpy.org/doc/stable/glossary.html#term-array_like)) – y-coordinate on the unit circle.
  * **out** ([`ndarray`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray), [`None`](https://docs.python.org/3/builtins/constants.html#None), or [`tuple`](https://docs.python.org/3/builtins/stdtypes.html#tuple) of [`ndarray`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray) and [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – A location into which the result is stored. If provided, it must have
    a shape that the inputs broadcast to. If not provided or None,
    a freshly-allocated array is returned. A tuple (possible only as a
    keyword argument) must have length equal to the number of outputs.
  * **where** ([array_like](https://numpy.org/doc/stable/glossary.html#term-array_like), *optional*) – This condition is broadcast over the input. At locations where the
    condition is True, the out array will be set to the ufunc result.
    Elsewhere, the out array will retain its original value.
    Note that if an uninitialized out array is created via the default
    `out=None`, locations within it where the condition is False will
    remain uninitialized.
  * **\*\*kwargs** – For other keyword-only arguments, see the
    [ufunc docs](https://numpy.org/doc/stable/reference/ufuncs.html#ufuncs-kwargs).
* **Returns:**
  **angle** ([`ndarray`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray)) – The inverse sine of each element in x, in radians and in the
  closed interval `[-pi/2, pi/2]`.
  This is a scalar if x is a scalar.

#### SEE ALSO
[`sin`](xarray.ufuncs.sin.html.md#xarray.ufuncs.sin), [`cos`](xarray.ufuncs.cos.html.md#xarray.ufuncs.cos), [`arccos`](xarray.ufuncs.arccos.html.md#xarray.ufuncs.arccos), [`tan`](xarray.ufuncs.tan.html.md#xarray.ufuncs.tan), [`arctan`](xarray.ufuncs.arctan.html.md#xarray.ufuncs.arctan), [`arctan2`](xarray.ufuncs.arctan2.html.md#xarray.ufuncs.arctan2), `emath.arcsin`

### Notes

arcsin is a multivalued function: for each x there are infinitely
many numbers z such that $sin(z) = x$.  The convention is to
return the angle z whose real part lies in [-pi/2, pi/2].

For real-valued input data types, *arcsin* always returns real output.
For each value that cannot be expressed as a real number or infinity,
it yields `nan` and sets the invalid floating point error flag.

For complex-valued input, arcsin is a complex analytic function that
has, by convention, the branch cuts [-inf, -1] and [1, inf]  and is
continuous from above on the former and from below on the latter.

The inverse sine is also known as asin or sin^{-1}.

### References

Abramowitz, M. and Stegun, I. A., *Handbook of Mathematical Functions*,
10th printing, New York: Dover, 1964, pp. 79ff.
[https://personal.math.ubc.ca/~cbm/aands/page_79.htm](https://personal.math.ubc.ca/~cbm/aands/page_79.htm)

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('e34b4316-3e1f-4d29-95eb-5e987d7f6d66','340dde48-e356-42db-bb9c-99e10f530092','b8b3090f-980a-45c0-bf07-35f4fd7f1cb3','../lite/tree/../notebooks/index.html?path=1f8f32f6_350e_4581_9042_a7605308a5e8.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> import numpy as np
>>> np.arcsin(1)     # pi/2
1.5707963267948966
>>> np.arcsin(-1)    # -pi/2
-1.5707963267948966
>>> np.arcsin(0)
0.0
```

<div id="b8b3090f-980a-45c0-bf07-35f4fd7f1cb3" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('e34b4316-3e1f-4d29-95eb-5e987d7f6d66','b8b3090f-980a-45c0-bf07-35f4fd7f1cb3')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('e34b4316-3e1f-4d29-95eb-5e987d7f6d66','b8b3090f-980a-45c0-bf07-35f4fd7f1cb3')">Open In Tab</button></div><div id="340dde48-e356-42db-bb9c-99e10f530092" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
