Output shape of torch.linalg.norm
diverges from numpy equivalent in edge case.
#59198
Labels
high priority
module: linear algebra
Issues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmul
module: norms and normalization
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Bug
Output shape of
torch.linalg.norm
diverges from numpy equivalent in edge case.To Reproduce
ord=-2
but works for all other orderskeepdim=True
Environment
Additional context
This is tested in
pytorch/test/test_linalg.py
Line 1928 in 6d45d7a
but the test never failed due to a bug in the underlying comparison mechanism. #59067 will disable the failing test case, but it should be reinstated as soon as this issue is fixed.
cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @jianyuh @nikitaved @pearu @mruberry @heitorschueroff @walterddr @IvanYashchuk @xwang233 @lezcano @VitalyFedyunin
The text was updated successfully, but these errors were encountered: