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

`__getitem__` does not support advanced (fancy) indexing

Đang mở
#70 0 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
numpy, python
Lĩnh vực
machine-learning

Hướng nghiên cứu

Read leanpass/tensor.py, focusing on __getitem__ and its backward pass. Reproduce the reported behavior with list and boolean-array indices, then determine whether the intended change is to support fancy indexing or document the basic-slicing limitation. Done means the chosen behavior is implemented or documented, with the reported shape-mismatch case addressed.

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

Mô tả

docs

File: leanpass/tensor.py

The backward pass for __getitem__ builds a zero buffer and assigns grad_buf[idx] = out.grad. This works for slices and simple integer indexing but fails for NumPy advanced indexing (e.g., lists or boolean arrays) because the assignment semantics differ and may raise shape mismatches. Add handling for fancy indexing or explicitly document that only basic slicing is supported.

Filed automatically by ai-issue-scan.

Ngôn ngữ chính
Python
Star
16
Fork
1
Merge trung bình
2 ngày 8 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

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 Terminay/leanpass

Tất cả issue của Terminay/leanpass

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.