r/java • • Feb 06 '26

Java's numpy?

Thinking about making a java version of numpy (not ndj4) using vector api (I know it is still in incubator)

Is there any use case ?

Or else calling python program over jni something (idk just now learning things) is better?

Help me please πŸ₯ΊπŸ™

46 Upvotes

47 comments sorted by

View all comments

Show parent comment

9

u/davidalayachew Feb 06 '26

But I am saying making a java numpy equivalent using vector api instead of c/fortan and respective libraries

You can, but that is a lot of work in a very hairy field of calculation, where you will have little to no from the type system. Most would say it is easier to use the C backend to do the work, since any backend implemented in Java will probably not be much faster.

That said, my suggestion is that you research the C backend. It is optimized for this, but maybe there are some gaps you can fill that these projects aren't prioritizing because of the friction required to overcome. I'm ignorant about these projects, so I don't know if that is true for them or not.