plotly / plotly/plotly.js

allow plotly.js to accept numpy buffers

オープン
#1,784 コメント 14 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

feature P3
主要言語
JavaScript
スター
18.3k
フォーク
2k
平均マージ
2日 12時間
マージ済み PR(30日)
28

説明

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:

https://codepen.io/plotly/pen/GEoPgv

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、参照されている ipyvolume serialize.py と js/src/serialize.js の実装を比較し、次に Plotly.js に既存する pointcloud の Float32Array 処理と GL trace のエントリーポイントを調査します。この issue では Plotly.js のファイルやテストは指定されていません。完了には、サポートする GL trace の範囲、バッファのデシリアライズ、および配列データが JSON シリアライゼーションを回避することの検証について合意する必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
computer-graphics, data-visualization
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。