`searchsorted` needs to broadcast batch shapes
Maintainer thường phản hồi trong vòng 1 ngày
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
- 56/100
Hướng nghiên cứu
Start by locating the searchsorted implementation and its tests; the issue provides a reproducer for the failing case where x has shape (2, 5) and y has shape (5,). Read how the function handles batch dimensions, then run the relevant tests with this case. Done means the batch shapes broadcast and the call succeeds with the expected indices.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Ran into this in scipy/scipy#26324:
import numpy as np
from scipy._external import array_api_extra as xpx
rng = np.random.default_rng(2398198374572881)
shape_1d = (5,)
shape_2d = (2, 5)
x = np.sort(rng.random(shape_1d), axis=-1)
y = rng.random(shape_2d)
xpx.searchsorted(x, y) # OK
x = np.sort(rng.random(shape_2d), axis=-1)
y = rng.random(shape_1d)
xpx.searchsorted(x, y) # not OK
# ValueError: input operand has more dimensions than allowed by the axis remapping
My workaround there was to broadcast the batch shapes (e.g. batch_shape = xp.broadcast_shapes(x1.shape[:-1], x2.shape[:-1])) and reshape the arguments accordingly.
- Ngôn ngữ chính
- Python
- Star
- 33
- Fork
- 33
- Merge trung bình
- 1 giờ 16 phút
- Pull request đã merge (30 ngày)
- 32
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có 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 data-apis/array-api-extra
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
data-apis/array-api-extra#1005 · 15 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ENH: new function `replace`Đang mởenhancement new function
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
data-apis/array-api-extra#992 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Two small JAX-related cleanupsĐang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 52/100
data-apis/array-api-extra#1011 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ENH, TST: Add support for MLX as array backendCó thể đã có người làm @prady0t đã nhận 5 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
data-apis/array-api-extra#1006 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
data-apis/array-api-extra#1002 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của data-apis/array-api-extra
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NVIDIA/earth2studio#1241 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
docs(types): update the collection binding note now that typed collections shipped in pycubrid 1.9.0Đang mởdocumentation priority: low size: S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cubrid-lab/sqlalchemy-cubrid#768 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
--csv-bom was never wired up: PR #850 added an unused helper parameter, so #846 is not fixedĐang mởbug help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Broken link in index.rstĐang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
ansys/pydpf-core#3547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OktoLabsAI/okto-pulse#114 ·
Maintainer thường phản hồi trong vòng 1 ngày