np.isnan combined with np.argwhere
x = np.array([[1,2,3,4],
[2,3,np.nan,5],
[np.nan,5,2,3]])
np.argwhere(np.isnan(x))
output:
array([[1, 2],
[2, 0]])
More Related Contents:
- Sorting arrays in NumPy by column
- Moving average or running mean
- How to do exponential and logarithmic curve fitting in Python? I found only polynomial fitting
- How to smooth a curve in the right way?
- How to apply piecewise linear fit in Python?
- How to normalize a NumPy array to within a certain range?
- scipy: savefig without frames, axes, only content
- Save / load scipy sparse csr_matrix in portable data format
- Installing scipy in Python 3.5 on 32-bit Windows 7 Machine
- Find matching rows in 2 dimensional numpy array
- numpy.where() detailed, step-by-step explanation / examples [closed]
- Resampling a numpy array representing an image
- Fitting a 2D Gaussian function using scipy.optimize.curve_fit – ValueError and minpack.error
- How to plot empirical cdf (ecdf)
- Most efficient way to sort an array into bins specified by an index array?
- Get coordinates of local maxima in 2D array above certain value
- Python baseline correction library
- how to annotate heatmap with text in matplotlib
- Linear regression of arrays containing NANs in Python/Numpy
- How to filter numpy array by list of indices?
- Error “Import Error: No module named numpy” on Windows
- Fitting a closed curve to a set of points
- Generating Discrete random variables with specified weights using SciPy or NumPy
- setting spacing between grouped bar plots in matplotlib
- Compute a confidence interval from sample data assuming unknown distribution
- Is the order of a Python dictionary guaranteed over iterations?
- Is there a numpy/scipy dot product, calculating only the diagonal entries of the result?
- sampling random floats on a range in numpy
- Fast interpolation of grid data
- How to create a density plot