MLX compatibility: Manipulation functions
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
- 48/100
Hướng nghiên cứu
Bắt đầu bằng cách chạy các bài kiểm tra tương thích được nêu tên: test_broadcast_arrays, test_moveaxis, test_unstack và các bài kiểm tra expand_dims, repeat, reshape và roll. Đọc các triển khai và kỳ vọng của bài kiểm tra cho từng trường hợp thất bại hoặc chưa hoàn thiện. Được coi là hoàn tất khi hành vi tương thích của MLX khớp với các yêu cầu của Array API được liệt kê trong bảng, bao gồm giá trị trả về dạng tuple, axes dạng tuple, các đầu vào repeat được chấp nhận, xử lý bản sao và các đối số chỉ dùng theo từ khóa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
| Array API | MLX Analog | Status | Notes | Test Node | Result |
|---|---|---|---|---|---|
| broadcast_arrays(*arrays) | broadcast_arrays(*arrays, stream=None) -> list[array] | incompatible | Array API 2025.12 requires a tuple of arrays; MLX returns a list. | test_broadcast_arrays | Failed |
| broadcast_shapes(*shapes) | broadcast_shapes(*shapes) | compatible | MLX returns the expected broadcasted shape. | TestBroadcastShapes::test_broadcast_shapes | Passed |
| broadcast_to(x, /, shape) | broadcast_to(array, shape, *, stream=None) | compatible | Required broadcasting behavior passes. MLX adds the optional stream extension. |
test_broadcast_to | Passed |
| concat(arrays, /, *, axis=0) | concat(arrays: list[array], axis: int | None = 0, *, stream=None) | compatible | Required behavior passes. MLX additionally accepts axis=None, positional axis, and stream. |
test_concat | Passed |
| expand_dims(x, /, axis) | expand_dims(a, /, axis: int | Sequence[int], *, stream=None) | partial | Tuple-axis coverage passes, but MLX incorrectly rejects a valid negative insertion axis at the lower boundary. | TestExpandDims::test_expand_dims; TestExpandDims::test_expand_dims_tuples | Failed / Passed |
| flip(x, /, *, axis=None) | flip(a, /, axis: None | int | Sequence[int] = None, *, stream=None) | compatible | Passes for None, integer, and tuple axes. MLX additionally permits positional axis. |
test_flip | Passed |
| moveaxis(x, source, destination, /) | moveaxis(a, /, source: int, destination: int, *, stream=None) | incompatible | Array API accepts integers or tuples for source and destination; MLX accepts only scalar integers and rejects valid calls such as moveaxis(x, (), ()). |
test_moveaxis | Failed |
| permute_dims(x, /, axes) | permute_dims(a, /, axes: Sequence[int] | None = None, *, stream=None) | compatible | Required axis permutation behavior passes. MLX additionally permits omitted or None axes. |
test_permute_dims | Passed |
| repeat(x, repeats, /, *, axis=None) | repeat(array: array, repeats: int, axis: int | None = None, *, stream=None) | partial | Array API allows scalar or 1D integer-array repeats, while MLX documents only scalar integers. |
test_repeat | Failed |
| reshape(x, /, shape, *, copy=None) | reshape(a, /, shape: Sequence[int], *, stream=None) | partial | Tested behavior passes, but MLX lacks the standard copy keyword and therefore cannot accept all conforming calls. |
test_reshape | Passed |
| roll(x, /, shift, *, axis=None) | roll(a, shift: int | tuple[int], axis: None | int | tuple[int] = None, /, *, stream=None) | partial | Tested behavior passes, but MLX makes shift and axis positional-only. Array API permits keyword shift and requires axis to be keyword-only. |
test_roll | Passed |
| squeeze(x, /, axis) | squeeze(a, /, axis: None | int | Sequence[int] = None, *, stream=None) | compatible | Integer and tuple-axis behavior passes. MLX additionally allows omitted or None axes. |
test_squeeze | Passed |
| stack(arrays, /, *, axis=0) | stack(arrays: list[array], axis: int | None = 0, *, stream=None) | compatible | Required behavior passes. MLX additionally accepts positional axis, axis=None, and stream. |
test_stack | Passed |
| tile(x, repetitions, /) | tile(a, reps: int | Sequence[int], /, *, stream=None) | compatible | Required tiling behavior passes. The parameter-name difference is irrelevant because it is positional-only. | test_tile | Passed |
| unstack(x, /, *, axis=0) | unstack(x, /, *, axis: int = 0, stream=None) -> list[array] | incompatible | Array API requires a tuple of arrays; MLX returns a list, including [] instead of () for an empty axis. |
test_unstack | Failed |
- Ngôn ngữ chính
- Python
- Star
- 131
- Fork
- 49
- Merge trung bình
- 2 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 6
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-compat
-
blocked by upstream
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
data-apis/array-api-compat#439 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
data-apis/array-api-compat#395 · 2 bình luận ·
-
Release 1.16 Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
data-apis/array-api-compat#476 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
data-apis/array-api-compat#473 · 4 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
data-apis/array-api-compat#465 · 3 bình luận ·
Tất cả issue của data-apis/array-api-compat
Issue tương tự
-
documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
simonw/sqlite-utils#872 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100