Minor bug fixes
Fixed type error trying to use float in range(...)
Fixed usage of deprecated numpy.unique1d()