Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy #index #nan
ADD COMMENT
Topic
Name
2+5 =