use memoryviews in cython code