Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

numpy get index of nan

x = np.array([[1,2,3,4],
              [2,3,np.nan,5],
              [np.nan,5,2,3]])
np.argwhere(np.isnan(x))
array([[1, 2],
       [2, 0]], dtype=int64)
Comment

PREVIOUS NEXT
Code Example
Python :: python dictionary sort in descending order 
Python :: save file python tkinter 
Python :: how ot split a string every fourth eter 
Python :: epoch to datetime python 
Python :: tkinter give button 2 commands 
Python :: alphabet list python 
Python :: how to set learning rate in keras 
Python :: Create MySQL table from Python 
Python :: install python glob module in windows 
Python :: How to get random int between two numbers python 
Python :: python check if there is internet 
Python :: stopwatch in python 
Python :: month from datetime pandas 
Python :: python cv2 screen capture 
Python :: python filter None dictionary 
Python :: check if string url python 
Python :: connect postgresql with python sqlalchemy 
Python :: isprime function in python 
Python :: python find all pairs in list 
Python :: python key down 
Python :: how to get input in tkinter 
Python :: np euclidean distance python 
Python :: python runtime 
Python :: selenium exception handling python 
Python :: capture output of os.system in python 
Python :: discord.py dm specific user 
Python :: remove nan from list python 
Python :: OSError: cannot write mode RGBA as JPEG Python 
Python :: set window size tkinter 
Python :: count similar values in list python 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =