also switch hsmm code to memoryviews
c.f. #27