Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since torch.searchsorted is now in the stable 1.6 release, here is a PR changing the implementation to the official one.
Furthermore I added the dependency on PyTorch 1.6 and added a line in the README.
I was wondering if keeping the old solution, using @aliutkus torchsearchsorted, might be a good idea for people that can't upgrade to PyTorch 1.6 yet. Since there's no PyPi release anyways, I would suggest tagging both the last release and this one and maybe provide
pip install
commands for both in the README? Let me know if you think this is sensible, I can gladly add this.