If you refer the source (of PyMC3) you can observe that this error can be avoided only by setting the stop value in the slice to none. It seems for some reason PyMC3 does not support slicing the stop index.
I’m very curious to know why isn’t it supported? @junpenglao any ideas?