Array comparison operators/functions

Đang mở
#1,431 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
32/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
data

Hướng nghiên cứu

Start by reviewing the requested ndarray comparison functions and operators in the issue, along with the existing array APIs that would need to support them. Define the comparison scope and expected behavior, including examples such as geq, allclose, isclose, and equal; done means the selected APIs are implemented with tests covering the documented comparisons.

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

Mô tả

enhancement

Hi,

I come from a Python background. I have used numpy for array-based computing and recently started working on JAX. They have very easy-to-use array comparison functions ^1^3 to check the relative, partial order etc. I find a lack of these functions/operators here. It would be a great enhancement and would help in testing code without writing a bunch of lines to compare errors or check the relationship between two arrays.

Until now I have been doing things like this,

assert!(distance.iter().all(|&d| d >= -ERR_MARGIN));

With the feature, it should more or less look like this,

assert!(distance.geq(-ERR_MARGIN));
Ngôn ngữ chính
Rust
Star
4.3k
Fork
391
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 rust-ndarray/ndarray

Tất cả issue của rust-ndarray/ndarray

Issue tương tự

Thêm issue về Rust

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.