Improve adherence to Python array API Standards

Đang mở
#740 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

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ái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
numpy, python
Lĩnh vực
backend

Hướng nghiên cứu

Start by reading PyLops’ backend module and the Python Array API Standards documentation, then compare the module’s current responsibilities with array-api-compat. The issue does not identify specific files or tests; first determine a concrete scope for adopting the standard. Done should mean an agreed, tested path toward better standard adherence, but the issue does not define that path.

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

Mô tả

enhancement

Since v1.12.0, PyLops started to support alternative backends to NumPy, with the main goal of being able to perform computations (i.e., apply operators and solvers) on GPUs.

Initially, inter-operating different array/tensor libraries required "a lot" of manual work due to inconsistent APIs and lack of a unifying layer. As such we created the backend module to encapsulate as much of the boilerplate code and limit changes in the actual operator/solver implementations. This allow allowed us to have protected imports of optional libraries and fallback to NumPy when such libraries where not installed in the system.

Over time, the Python ecosystem has caught up with initiatives such as the Python Array API Standards that creates a unified standard that all array/tensor libraries have to adhere to. If a library adheres to the standard, it becomes easier to write a tensor-library agnostic code.

More recently application libraries that serve purposes similar to that of PyLops have started to adopt this standard, with scikit-learn being an example https://labs.quansight.org/blog/array-api-scikit-learn-2026. Also utility libraries have started to appear (e.g., array-api-compat which serve very similar purpose to what we do in the backend module.

It is maybe about time to start looking into this and unifying ourselves to the standard that started to appear and is now quite widely recognized and adopted.

Ngôn ngữ chính
Python
Star
539
Fork
126
Merge trung bình
2 ngày 17 giờ
Pull request đã merge (30 ngày)
21

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 PyLops/pylops

Tất cả issue của PyLops/pylops

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.