Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 939 Bytes

File metadata and controls

20 lines (15 loc) · 939 Bytes

Inpaint NaNs (Python Port)

This repository contains a Python adaptation of John D’Errico’s original MATLAB function, inpaint_nans, for filling (inpainting) missing or invalid data in arrays. The code is useful for image restoration, surface reconstruction, or any application where NaN values need to be replaced in a smooth, physically motivated way.

Original Matlab repository: https://se.mathworks.com/matlabcentral/fileexchange/4551-inpaint_nans

Contents

  • inpaint_nans.py: The core function, ported from MATLAB to Python.
  • test_inpaint_nans.py: Example script demonstrating usage.

Requirements

  • Python 3+
  • NumPy
  • SciPy
  • Matplotlib (for plotting)

Acknowledgments