allow plotly.js to accept numpy buffers
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 18.3k
- Fork
- 2k
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 28
Mô tả
If we allowed all GL plot types to accept numpy buffers for plot x/y/z data, then the Python library could optionally avoid JSON serialization of array data, like @maartenbreddels does in his brillant project ipyvolume:
https://github.com/maartenbreddels/ipyvolume/blob/master/ipyvolume/serialize.py#L95
Here is the deserialization on the JS side:
https://github.com/maartenbreddels/ipyvolume/blob/master/js/src/serialize.js#L16
Plotly.js has all of these incredible WebGL figures for scientific computing, but their potential in Python, R, MATLAB, etc is limited by the JSON serialization step.
In a similar vein, it seems like all GL types should be able to accept Float32Array's directly instead of untyped JS arrays. Currently, it looks like only the Plotly trace type pointcloud accepts Float32Array's:
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.
Hướng nghiên cứu
Bắt đầu bằng cách so sánh các triển khai ipyvolume serialize.py và js/src/serialize.js được tham chiếu, sau đó kiểm tra cách xử lý Float32Array hiện có của pointcloud trong Plotly.js và các điểm đầu vào của GL trace. Issue không nêu tệp hoặc test nào của Plotly.js; để hoàn thành sẽ cần thống nhất phạm vi các GL trace được hỗ trợ, việc giải tuần tự hóa buffer và xác minh rằng dữ liệu mảng tránh việc tuần tự hóa JSON.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- computer-graphics, data-visualization
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100