Cython version p-rbm