account for difference in indexing between matlab and python