Created by: zhiqiu
Fix a bug when using varbase.__getitem__
in python2 with long int, e.g.:
The correct result should be [2L, 80L, 16000L].
Plus, original __getitem__
does not raise errors when called with float and other types, while numpy and torch does. e.g.:
var[1.1] or var[:, 1.1:]