# xarray.ufuncs.signbit

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

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

Documentation from numpy:

Returns element-wise True where signbit is set (less than zero).

* **Parameters:**
  * **x** ([array_like](https://numpy.org/doc/stable/glossary.html#term-array_like)) – The input value(s).
  * **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:**
  **result** ([`ndarray`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray) of [`bool`](https://docs.python.org/3/builtins/functions.html#bool)) – Output array, or reference to out if that was supplied.
  This is a scalar if x is a scalar.

#### SEE ALSO
[`sign`](xarray.ufuncs.sign.html.md#xarray.ufuncs.sign), [`copysign`](xarray.ufuncs.copysign.html.md#xarray.ufuncs.copysign)

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('f58f89d9-630d-4460-9e4a-48508a71b6be','49376e74-c732-41bb-9385-e2c2b2dffe38','a1b13998-d80f-4488-8d25-7adff34ce3ed','../lite/tree/../notebooks/index.html?path=fbf360c5_3d4e_4213_89ff_aded28256fbe.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> import numpy as np
>>> np.signbit(-1.2)
True
>>> np.signbit(np.array([1, -2.3, 2.1]))
array([False,  True, False])
```

<div id="a1b13998-d80f-4488-8d25-7adff34ce3ed" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('f58f89d9-630d-4460-9e4a-48508a71b6be','a1b13998-d80f-4488-8d25-7adff34ce3ed')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('f58f89d9-630d-4460-9e4a-48508a71b6be','a1b13998-d80f-4488-8d25-7adff34ce3ed')">Open In Tab</button></div><div id="49376e74-c732-41bb-9385-e2c2b2dffe38" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
