@property
    def kernel_var(self):
        if self._kernel_var is None:
            func = lambda x: x**2 * self.norm_const * self._shape(x)
            if self.domain is None:
                self._kernel_var = scipy.integrate.quad(func, -inf, inf)[0]
            else:
                self._kernel_var = scipy.integrate.quad(func, self.domain[0],
                                               self.domain[1])[0]
        return self._kernel_var
Take an IP string/int and return an object of the correct type.
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/nonparametric/kernels.py/CustomKernel.kernel_var--crossover with--dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/ipaddress.py/ip_network