Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide conveniences around converting Numpy arrays to/from Javascript typed arrays #64

Closed
mdboom opened this issue Jun 27, 2018 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers numpy

Comments

@mdboom
Copy link
Collaborator

mdboom commented Jun 27, 2018

Currently, you can pass a typed array to Python, getting a buffer which you can then use with np.frombuffer to get a Numpy array (and make sure you match the datatype on both sides). When passing a Numpy array to Javascript, you get regular (non-typed) Javascript arrays, which is a less-than-optimal use of memory. This requires getting the datatype correct and knowing how to do this.

It would be nice to have a more convenient way to do this. It can't be built-in, since the user may not be using Numpy, but maybe if there's an explicit way to turn this on, the conversion code could then implicitly do this.

@mdboom mdboom added enhancement New feature or request numpy good first issue Good for newcomers labels Jun 27, 2018
@mdboom mdboom closed this as completed in #68 Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers numpy
Projects
None yet
Development

No branches or pull requests

1 participant