Bug with the matrix class such that attributes cannot be set
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
- 42/100
Hướng nghiên cứu
Start by tracing matrix class handling for attr("dimnames") and compare it with the working cpp_names example. Reproduce the commented cpp_colnames case and verify that matrix attributes can be assigned while preserving the expected row and column names.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Such as it's the case for names(), it would be extremely convenient to have rownames() and colnames() in cpp codes.
My idea (sorry that I don't enough C++) would be like:
// THIS WORKS
[[cpp11::register]]
doubles cpp_names(writable::doubles X) {
X.attr("names") = {"a","b"};
return X;
}
// THIS WON'T
// [[cpp11::register]]
// doubles_matrix<> cpp_colnames(writable::doubles_matrix<> X) {
// writable::list dimnames;
// dimnames.push_back(NULL);
// dimnames.push_back({"a","b"});
// X.attr("dimnames") = dimnames;
// return X;
// }
- Ngôn ngữ chính
- C++
- Star
- 224
- Fork
- 52
- 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
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 r-lib/cpp11
-
Dimension error with `r_vector` Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ros2/message_filters#338 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
subsurface/subsurface#4984 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
google-ai-edge/LiteRT-LM#3739 ·