# xarray.ufuncs.isnat

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

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

Documentation from numpy:

Test element-wise for NaT (not a time) and return result as a boolean array.

* **Parameters:**
  * **x** ([array_like](https://numpy.org/doc/stable/glossary.html#term-array_like)) – Input array with datetime or timedelta data type.
  * **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:**
  **y** ([`ndarray`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray) or [`bool`](https://docs.python.org/3/builtins/functions.html#bool)) – True where `x` is NaT, false otherwise.
  This is a scalar if x is a scalar.

#### SEE ALSO
[`isnan`](xarray.ufuncs.isnan.html.md#xarray.ufuncs.isnan), [`isinf`](xarray.ufuncs.isinf.html.md#xarray.ufuncs.isinf), `isneginf`, `isposinf`, [`isfinite`](xarray.ufuncs.isfinite.html.md#xarray.ufuncs.isfinite)

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('f8f2e29d-c441-45b0-9c26-23ad1195c8d8','b0ae563c-5ba9-4f3b-88ba-43038984ebba','a4f7da94-e01e-4d13-a378-59c68312a7d3','../lite/tree/../notebooks/index.html?path=eba49551_71b2_43be_9c30_11eba933a122.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> import numpy as np
>>> np.isnat(np.datetime64("NaT", "D"))
True
>>> np.isnat(np.datetime64("2016-01-01"))
False
>>> np.isnat(np.array(["NaT", "2016-01-01"], dtype="datetime64[ns]"))
array([ True, False])
```

<div id="a4f7da94-e01e-4d13-a378-59c68312a7d3" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('f8f2e29d-c441-45b0-9c26-23ad1195c8d8','a4f7da94-e01e-4d13-a378-59c68312a7d3')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('f8f2e29d-c441-45b0-9c26-23ad1195c8d8','a4f7da94-e01e-4d13-a378-59c68312a7d3')">Open In Tab</button></div><div id="b0ae563c-5ba9-4f3b-88ba-43038984ebba" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
