Thanks for the update! The stacktrace points to an invalid indexing operation in:
points[batch_indices, idx, :]

so check the shape of points as well as the min. and max. values of batch_indices and idx and make sure they are valid.