Greetings, this is my first post and I hope the question is not too vague.
I’m working on a scientific application with the intention of eventually releasing it to the wider public. Python seems the best choice for this, and I prefer numba over cpython or similar as I believe that it would be easier for others to understand and improve the code if it’s written in a single language. My goal is to have a library which allows the user to define a class instance, pass a dictionary of parameters to it, and then call some class methods to run the calculation–pretty standard stuff.
I’m currently fumbling around with numba.experimental.jitclass. My doubt at the moment is how to best pass a user-defined dictionary of parameters to the jitclass.
- I have read about typed Dictionaries, but the configuration parameters include ints, floats and strings, so the user would have to define several dictionaries in a very non-intuitive way.
- The documentation suggests Heterogeneous Literal String Key Dictionaries as an option for the specific purpose of passing parameters, but it seems that it would be even more challenging for the user to define one.
I suspect that, in the end, the best approach will be something like writing a standard python class which wraps around the jitclass, can process the user-defined dictionary and pass the parameters on to the jitclass. However, I am curious to know if there are other, better options that I am not seeing–and how other people in a similar situation have tackled this problem.