changed ndarray to memory views