nicolaspanel / numjs

Like NumPy, in JavaScript
MIT License
2.4k stars 184 forks source link

Split into smaller pieces that can be loaded individually #23

Closed ghost closed 6 years ago

ghost commented 7 years ago

Hi Nicolas, Thank you for your work on this package, I think it would be great to be able to only load an indiviual function in the same way that gl-mat4 does : https://github.com/stackgl/gl-mat4 With that package, you're able to write:

var scale = require('gl-mat4').scale
var scale = require('gl-mat4/scale')

And it would be amazing it the same thing were possible with this package, like:

var linspace = require('numjs/linspace');

If this is something you'd consider, I might be able to help, even though it looks like the numpy methods I'm looking for are not included in your library, but I'll do more digging to find out. Cheers, Alvin

nicolaspanel commented 7 years ago

Hi @alvinsight and thank for your feedback.

I assume the point is to avoid loading the entire 170kB in your webapp / website using tools such as webpack (which is definitely a good idea).

I don't have I time for this kind of nice stuffs right now I'm affraid, but PR are always welcome ;)

PS: Please note that:

nicolaspanel commented 7 years ago

aside: what are the missing method you are looking for?

ghost commented 7 years ago

Hi Nicolas,

Good to know, thanks, it looks like I might not need numjs in the end, but if I do, I'll definitely look into this. The methods I was after were linspaceand arrange which I couldn't find in the docs :) Thank you, Alvin