CLN: use cython memoryviews for slightly more readable codez