TODO: transition PyBayes to use Cython memoryviews instead of NumPy arrays