Loosely assert for functions that produce ints but internally might use floats
@honno đang làm issue này rồi.
Từ ngày 1/11/2022.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
It looks like the test_trunc reference implementation is math.trunc for at least a subset of the checks. I noticed that for some large values there is a mismatch with both the pykokkos (ultimately C++) version of trunc and math.trunc, which causes the conformance test to fail. I see the same thing in NumPy as well--do you have a suggestion on how I should proceed here? Is this effectively related to arbitrary precision Python integers, etc.?
I'll just use NumPy rather than pykokkos below, to keep things familiar:
>>> import math
>>> import numpy as np
>>> math.trunc(9007199254740993)
9007199254740993
>>> np.trunc(9007199254740993)
9007199254740992.0
And then in the conformance testing: pytest array_api_tests/test_operators_and_elementwise_functions.py::test_trunc
AssertionError: out[0]=9007199254740992, but should be trunc(x[0])=9007199254740993 [trunc()]
Would you say that my reference implementation in pykokkos and the exposed NumPy trunc are both wrong here, and the test suite is correct or?
- Ngôn ngữ chính
- Python
- Star
- 74
- Fork
- 54
- Merge trung bình
- 4 giờ 35 phút
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của data-apis/array-api-tests
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
data-apis/array-api-tests#465 · 1 bình luận ·
-
Test reflected operators? Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
data-apis/array-api-tests#460 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
data-apis/array-api-tests#455 · 2 bình luận ·
-
tracking
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
data-apis/array-api-tests#381 · 9 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
data-apis/array-api-tests#379 · 10 bình luận ·
Tất cả issue của data-apis/array-api-tests
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/skills#1811 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
speaches-ai/speaches#678 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
datalayer/mcp-compose#42 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conda-forge/spacy-feedstock#177 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
UKGovernmentBEIS/inspect_evals#2523 ·