What's your problem?
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ệ
- python
- Lĩnh vực
- developer-experience
Hướng nghiên cứu
Bắt đầu bằng cách xem xét issue scipy-stubs được liên kết trong phần mô tả và ví dụ efax trong efax/_src/distributions/complex_normal/complex_normal.py. So sánh các vấn đề về typing của Array API được minh họa và thu thập các mẫu mã đại diện có thể định hướng cho việc cải thiện array-api-typing và các bài kiểm thử tích hợp. Công việc được xem là hoàn thành khi các trường hợp cần thiết được ghi lại đủ rõ ràng để định hướng công việc về typing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Let's collect a bunch of code samples from array-api libraries that array-api-typing could improve. That should help give us a better idea of what is needed. They should also be useful for (integration) testing.
Problems
scipy-stubs
See https://github.com/scipy/scipy-stubs/issues/140 for all of SciPy's functions that have (at least some) support for the Array API.
Here's an example from the scipy docs
import torch
from scipy.cluster.vq import vq
code_book = torch.tensor([[1., 1., 1.],
[2., 2., 2.]])
features = torch.tensor([[1.9, 2.3, 1.7],
[1.5, 2.5, 2.2],
[0.8, 0.6, 1.7]])
code, dist = vq(features, code_book)
print(code) # tensor([1, 1, 0], dtype=torch.int32)
print(dist) # tensor([0.4359, 0.7348, 0.8307])
There is currently no good way to annotate this behavior in scipy-stubs. Currently, with scipy-stubs==1.15.3.0, code and dist are inferred as 1d numpy arrays of int and float dtypes, respectively. The reason for this is the torch.tensor.__array__ method, cuasing it to be interpreted as a numpy "array-like".
efax
By @NeilGirdhar from https://github.com/data-apis/array-api-typing/issues/22#issuecomment-2973309168
Consider practically any function in my efax library. For example, we have:
def _r_s_mu(self) -> tuple[JaxComplexArray, JaxRealArray, JaxComplexArray]:
xp = array_namespace(self)
r = -self.pseudo_precision / self.negative_precision
s = xp.reciprocal((abs_square(r) - 1.0) * self.negative_precision)
k = self.pseudo_precision / self.negative_precision
l_eta = 0.5 * self.mean_times_precision / ((abs_square(k) - 1.0) * self.negative_precision)
mu = xp.conj(l_eta) - xp.conj(self.pseudo_precision / self.negative_precision) * l_eta
return r, s, mu
This is barely type-checked. It would be nice if xp: ArrayNamespace, r, s, k, l_eta, mu: Array, etc.
- Ngôn ngữ chính
- Python
- Star
- 27
- Fork
- 6
- 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
- Đọ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-typing
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
data-apis/array-api-typing#70 · 7 bình luận ·
-
Độ 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-typing#59 · 4 bình luận · 1 reaction ·
-
CI + lefthook Đang mở👷 CI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
data-apis/array-api-typing#40 · 1 reaction ·
-
Test suite for backends? Đ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-typing#30 · 3 reaction ·
-
Refactor Test Suite Đang mở✅ tests
data-apis/array-api-typing#25 · 1 bình luận · 1 reaction · 1 người được giao ·
Tất cả issue của data-apis/array-api-typing
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·