aplbrain / npyjs

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

Int16 dtype #6

Closed esperanc closed 4 years ago

esperanc commented 4 years ago

Thanks for your code! I found, however, that Int16 files were not supported. This can be fixed easily enough by including the following dtype

"<i2": { name: "int16", size: 16, arrayConstructor: Int16Array, },

Thanks

j6k4m8 commented 4 years ago

Thanks @esperanc! Did you have a particular use-case in mind here? I've added int16 in #7. I'll test it shortly (and then merge) but if you have a use-case and would like to give it a whirl before I merge to master, I'd be happy to wait to make sure it works for you!

esperanc commented 4 years ago

Thanks Jordan. Yes, I used your code in a medical image visualizer you can access here: https://observablehq.com/d/202d1615da944357

It worked perfectly!

Best Regards

--Claudio

On Mon, Jun 15, 2020 at 11:38 PM Jordan Matelsky notifications@github.com wrote:

Thanks @esperanc https://github.com/esperanc! Did you have a particular use-case in mind here? I've added int16 in #7 https://github.com/aplbrain/npyjs/pull/7. I'll test it shortly (and then merge) but if you have a use-case and would like to give it a whirl before I merge to master, I'd be happy to wait to make sure it works for you!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aplbrain/npyjs/issues/6#issuecomment-644495688, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDKIPOD6CH63ZAS6KRPM3RW3LLFANCNFSM4N7AAJ2Q .

j6k4m8 commented 4 years ago

Excellent! So glad it's working for you. Love the visualizer, too! :)

j6k4m8 commented 4 years ago

Fixed in #7