Numpy - Replace a number with NaN Numpy - Replace a number with NaN arrays arrays

Numpy - Replace a number with NaN


A[A==NDV]=numpy.nan

A==NDV will produce a boolean array that can be used as an index for A