Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

API/TST: array-ness of desired and expected values does not match in several tests

Đang mở
#271 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
numpy, python

Hướng nghiên cứu

Bắt đầu với tests/test_funcs.py, đặc biệt là TestCreateDiagonal::test_nd và TestIsClose::test_basic, rồi tái hiện các lỗi được liệt kê với check_scalar=True. Theo dõi cách các giá trị mong muốn và giá trị kỳ vọng được tạo ra cho các trường hợp NumPy và chỉ đọc; hoàn tất khi các assertion về tính chất mảng của những test bị ảnh hưởng đều đạt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

API testing xpx.testing

Re gh-267; I'm making the default for check_scalar=False because of the following failures with check_scalar=True:

FAILED tests/test_funcs.py::TestCreateDiagonal::test_nd[numpy-shape1] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestCreateDiagonal::test_nd[numpy-shape6] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestCreateDiagonal::test_nd[numpy-shape8] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestCreateDiagonal::test_nd[numpy:readonly-shape1] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestCreateDiagonal::test_nd[numpy:readonly-shape6] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestCreateDiagonal::test_nd[numpy:readonly-shape8] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-0.0-0.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-0.0-0.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1.0-1.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1.0-1.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1.0-2.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1.0-2.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1.0--1.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1.0--1.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-100.0-101.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-100.0-101.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-0-0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-0-0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1-1-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1-1-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1-2-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1-2-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1--1-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1--1-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-(1+1j)-(1+1j)-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-(1+1j)-(1+1j)-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-(1+1j)-(1-1j)-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-(1+1j)-(1-1j)-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-inf-inf-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-inf-inf-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-inf-100.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-inf-100.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-inf--inf-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-inf--inf-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy--inf--inf-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy--inf--inf-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-nan-nan-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-nan-nan-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-nan-100.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-nan-100.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1000000.0-1000001.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1000000.0-1000001.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1000000.0-1000100.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1000000.0-1000100.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1e-06-1.1e-06-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1e-06-1.1e-06-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1e-07-1.1e-07-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-1e-07-1.1e-07-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-(1000000+0j)-(1000000+1j)-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-(1000000+0j)-(1000000+1j)-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-(1000000+0j)-(1000000+100j)-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy-(1000000+0j)-(1000000+100j)-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-0.0-0.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-0.0-0.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1.0-1.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1.0-1.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1.0-2.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1.0-2.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1.0--1.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1.0--1.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-100.0-101.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-100.0-101.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-0-0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-0-0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1-1-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1-1-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1-2-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1-2-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1--1-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1--1-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-(1+1j)-(1+1j)-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-(1+1j)-(1+1j)-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-(1+1j)-(1-1j)-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-(1+1j)-(1-1j)-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-inf-inf-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-inf-inf-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-inf-100.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-inf-100.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-inf--inf-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-inf--inf-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly--inf--inf-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly--inf--inf-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-nan-nan-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-nan-nan-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-nan-100.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-nan-100.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1000000.0-1000001.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1000000.0-1000001.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1000000.0-1000100.0-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1000000.0-1000100.0-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1e-06-1.1e-06-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1e-06-1.1e-06-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1e-07-1.1e-07-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-1e-07-1.1e-07-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-(1000000+0j)-(1000000+1j)-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-(1000000+0j)-(1000000+1j)-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-(1000000+0j)-(1000000+100j)-False] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_basic[numpy:readonly-(1000000+0j)-(1000000+100j)-True] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestIsClose::test_python_scalar[numpy] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestKron::test_python_scalar[numpy] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestKron::test_python_scalar[numpy:readonly] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestSinc::test_simple[numpy] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestSinc::test_simple[numpy:readonly] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestSinc::test_xp[numpy] - AssertionError: array-ness does not match:
FAILED tests/test_funcs.py::TestSinc::test_xp[numpy:readonly] - AssertionError: array-ness does not match:
FAILED tests/test_lazy.py::test_lazy_apply_kwargs[numpy-False] - AssertionError: array-ness does not match:
FAILED tests/test_lazy.py::test_lazy_apply_kwargs[numpy-True] - AssertionError: array-ness does not match:
FAILED tests/test_lazy.py::test_lazy_apply_kwargs[numpy:readonly-False] - AssertionError: array-ness does not match:
FAILED tests/test_lazy.py::test_lazy_apply_kwargs[numpy:readonly-True] - AssertionError: array-ness does not match:
=============== 109 failed, 2450 passed, 5101 skipped in 14.32s ================

This should be investigated, since the default value of check_scalar should probably be True.

Ngôn ngữ chính
Python
Star
33
Fork
32
Merge trung bình
5 giờ 58 phút
Pull request đã merge (30 ngày)
47

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của data-apis/array-api-extra

Tất cả issue của data-apis/array-api-extra

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.