sorting

Đang mở
#195 3 bình luận 4 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
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
data

Hướng nghiên cứu

Start with the issue's sort_matrix example and the ndarray APIs around Axis selection. The request leaves column, row, and n-dimensional sorting scope unresolved, and names no files or tests; clarify the supported behavior and completion criteria with maintainers before locating an implementation point.

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

Mô tả

enhancement help wanted

For a project I'm working on, I wrote a function that sorts a 2d matrix by the values in a particular column. Wanted to see if you were interested in generalizing this for ndarray (e.g. sort by row value, n-dimensional sorting etc).

pub fn sort_matrix(mat : Mat<f64>, sort_col: ArrayView<f64,Ix>) -> Mat<f64>{
    let mut enum_col = sort_col.iter().enumerate().collect::<Vec<(usize, &f64)>>();
    enum_col.sort_by(|a, &b| a.1.partial_cmp(b.1).unwrap());
    let indices = enum_col.iter().map(|x| x.0).collect::<Vec<usize>>();
    mat.select(Axis(0), indices.as_slice())
}
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.