SyntaxFix
Write A Post
Hire A Developer
Questions
You can use np.where to match the boolean conditions corresponding to Nan values of the array and map each outcome to generate a list of tuples.
np.where
Nan
map
tuples
>>>list(map(tuple, np.where(np.isnan(x)))) [(1, 2), (2, 0)]