Re:JNumPy: Writing high-performance C extensions for Python ...
by majoe on Wednesday August 10, 2022 @03:13AM
(#32408674)
I had a look at the demo folder, that's just a typo.
It should be:
jl_mat_mul = Pyfunc(mat_mul)
which makes a lot more sense.
Re:JNumPy: Writing high-performance C extensions for Python ...
by kortex on Wednesday August 10, 2022 @12:09AM
(#32407760)
Yeah, the boilerplate is rough, but python's import system is magic. There's no reason why you couldn't just do
from example.jl import mat_mul
and have it just work. (With the right libraries and import functionality of course.)
..which could be a heckuva lot friendlier and often safer than C!
The requisite python boilerplate is pretty ugly, though:
I also don't understand how jl_mat_mul gets mapped to mat_mul. Huh?