Match NumPy by considering NaNs to be larger than any number when sorting (#15886)
authorBrennan Vincent <btv@fb.com>
Fri, 11 Jan 2019 16:09:06 +0000 (08:09 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 11 Jan 2019 16:14:11 +0000 (08:14 -0800)
commit70dd44f6a8a20a52b8d800e08a8aa7ef98ee6352
tree1854829033a199e1ad5e931bb8d3aec9472b9a95
parentb7cdeb3fc3cdc71813c5f2b639fbf9bee5c6b843
Match NumPy by considering NaNs to be larger than any number when sorting (#15886)

Summary:
Fixes #15764
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15886

Differential Revision: D13612971

Pulled By: umanwizard

fbshipit-source-id: 91f552a25d1fd108f2f0b10e09a0ce0364f8c21e
aten/src/TH/generic/THTensorMoreMath.cpp
aten/src/THC/THCSortUtils.cuh
aten/src/THC/THCTensorSort.cuh
aten/src/THC/generic/THCTensorSort.cu
test/test_torch.py