It replaces the negative values in the array ar with 0. pyplot as plt import numpy as np create 1000 equally spaced points between -10 and 10 x np. . . inf is for positive infinity, and -np. This article will discuss some in-built NumPy functions that you can use to delete nan values. .