aplbrain / npyjs

Read numpy .npy files in JavaScript
https://aplbrain.github.io/npyjs/
Apache License 2.0
77 stars 21 forks source link

Functionality to allow ArrayBuffer inputs along with file path #35

Closed AdityaSarwade closed 1 year ago

AdityaSarwade commented 1 year ago

Hey, @j6k4m8 I've used your package in a few packages and I think it is a life-saver.

I faced an issue when I wanted to parse and open a .npy file from and ArrayBuffer in TypeScript. I identified that the load function internally creates an ArrayBuffer which stores the result of the fetch request.

It would be really helpful if we could bypass this part of the code when the passed argument is already an ArrayBuffer.

Although I am not as experienced as my peers, I'm submitting a PL as it might be a useful addition.

j6k4m8 commented 1 year ago

Yes, love it!! thank you for #36!!