Python | numpy.isnat () method

Using the numpy.isnat() method, we can get the boolean value as true if the date specified in np.datetime64 () is not tense using numpy.isnat () .

Syntax: numpy.isnat ()
Return: Return the boolean value if time is not found.

Example # 1:
In this In the example, we see that using numpy.isnat () we can get a boolean value if the time is not found in np.datetime64 () .

# NumPy import

import numpy as np

 
# using the numpy.isnat () method

gfg = np.isnat (np.datetime64 ( " Nat " ))

 

print (gfg)

Exit :

True

Example # 2:

# NumPy import

import numpy as np

 
# using the numpy.isnat () method

gfg = np.isnat (np.datetime64 ( " 1998-01-01 " ))

  

print (gfg)

Output:

False