sparse_disp: changes to rounding to improve compatibility

Older python versions require indices to be integers, replaced some instances of floor() with int()