Using numpy.nanargmin() in 2 dimensional matrix
NumPy arrays only have the argmin() attribute, but no nanargmin() attribute. So A.nanargmin() does not exist.
You can use numpy.argmin(A) and numpy.nanargmin(A) instead.
I am trying to obtain the argmin of a numpy 2 dimensional array A which has nan values. Now the problem is:

numpy.nanargmin(A) returns only one index.
numpy.unravel_index(A.argmin(), A.shape) returns [0,0] because it has nan values. 
And...
numpy.unravel_index(A.nanargmin(), A.shape) throws the error: 

AttributeError                            Traceback (most recent call
  last)  in ()
  ----> 1 np.unravel_index(dist.nanargmin(), dist.shape)  AttributeError: 'numpy.ndarray' object has no attribute 'nanargmin'