To add the kernel implementation to GPy, follow these steps: 1. Copy the file to the GPy/kern/parts folder and compile 2. Add the following lines to GPy/kern/constructors.py def periodic_spikes(input_dim,shape=1,period=168): part=parts.periodic_spikes.PeriodicSpikes(input_dim,shape,period) return kern(input_dim,[part]) 3. Add the following line to GPy/kern/parts/__init__.py import periodic_spikes To define the kernel: k = GPy.kern.periodic_spikes(input_dim=1, shape=10, period=168)