Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

allow plotly.js to accept numpy buffers #1784

Copy link
Copy link
Open
@jackparmer

Description

@jackparmer
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbacklogfeaturesomething newsomething new

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.