updated ndarray indexing