replacing numpy array with range for use in random.sample