Skip to content

Commit

Permalink
Merge pull request #117 from asmeurer/std-fix
Browse files Browse the repository at this point in the history
Fix torch.std() when correction is an integer
  • Loading branch information
asmeurer authored Mar 20, 2024
2 parents 94e42df + 1c779cb commit 189973f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions array_api_compat/torch/_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ def std(x: array,
_correction = int(correction)
if correction != _correction:
raise NotImplementedError("float correction in torch std() is not yet supported")
else:
_correction = correction

# https://github.com/pytorch/pytorch/issues/29137
if axis == ():
Expand Down
1 change: 1 addition & 0 deletions numpy-1-21-xfails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[_
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[floor_divide(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_greater[__gt__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_greater[greater(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_greater_equal[greater_equal(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_less[__lt__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_less[less(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_less_equal[less_equal(x1, x2)]
Expand Down

0 comments on commit 189973f

Please sign in to comment.