def integrate_box_1d(self, low, high):
        if self.d != 1:
            raise ValueError("integrate_box_1d() only handles 1D pdfs")

        stdev = ravel(sqrt(self.covariance))[0]

        normalized_low = ravel((low - self.dataset) / stdev)
        normalized_high = ravel((high - self.dataset) / stdev)

        value = np.mean(special.ndtr(normalized_high) -
                        special.ndtr(normalized_low))
        return value
Computes the integral of a 1D pdf between two bounds.
dataset/ETHPy150Open scipy/scipy/scipy/stats/kde.py/gaussian_kde.integrate_box_1d