Deprecated since version 1.1: The repair_image_nonfinite function is deprecated and may be removed in version 2.1.
Return a new image in which all the nonfinite entries of the original image have been replaced by the local mean.
numpy.ndarray– A two-dimensional
numpy.ndarrayof the same shape as the input that has all the non-finite entries replaced by a local mean. The algorithm repairs one non-finite entry at every pass. At each pass, the next non-finite value is replaced by the mean of its finite valued nearest neighbors.