torch.kthvalue
diverges from numpy equivalent for degenerate shape
#59201
Labels
module: numpy
Related to numpy support, and also numpy compatibility of our operators
module: reductions
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Bug
torch.kthvalue
diverges from numpy equivalent for degenerate shapeTo Reproduce
Expected behavior
The shapes should match.
Environment
Additional context
This is tested in
pytorch/test/test_reductions.py
Line 2424 in 6d45d7a
but the test never failed due to a bug in the underlying comparison mechanism. up the priority of numpy array comparisons in self.assertEqual聽#59067 will disable the failing test case, but it should be reinstated as soon as this issue is fixed.
IMO this is just a bug in the test suite that requires the
torch
andnumpy
shapes to match.numpy
does not collapse a dimension in case it encounters a degenerate input shape.cc @mruberry @rgommers @heitorschueroff @VitalyFedyunin @walterddr
The text was updated successfully, but these errors were encountered: