5 ms·
FTA: “For instance, this is all you need to turn numpy.save() into a node: from numpy import save main_callable = save third_party_import_text = 'from
by Someone 2y ago
FTA: “For instance, this is all you need to turn numpy.save() into a node:
from numpy import save
main_callable = save
third_party_import_text = 'from numpy import save'
”
So, if you want to turn multiple Numpy methods into nodes, you’ll have to copy-paste-edit this?
Looks unergonomic and slow (repeatedly parsing the Numpy file, once for each node to create) to me.
I would think a single file
from numpy import save,foo,bar,baz
should be enough to more efficiently generate four versions of the above.
What do I overlook?
- WillAdams 2y agoAt a guess, the implementation detail/difficulty of making multiple nodes from a single declaration.
- skeledrew 2y agoYou could use a script to automate creating the modules from import specs.
- KennedyRichard 2y agoCreator/maintainer of Nodezator here! You are completely right. This very week someone on Discord presented a relatively simple script he came up (with help from AI) that could do the job relatively well. As the creator/maintainer of the app, I always appreciate this kind of feedback. In this specific case, as I said to the person that presented the script, I did think about the possibility in the past, but didn't put time into it because at the time there were a few corner cases that came to mind. Also, as someone with insight into the many different parts that comprise Nodezator, it is not enough that a existing/pointed solution works, I must also think about ways in which these solutions integrate with the rest of the app, in order for everything to play well together. For instance, that is not the only improvement I'm planning for the node definitions. I have several ideas, both mine or shared by other users, for improving the node definitions. So I have to plan everything carefully before deciding on anything to avoid redoing things. Again, thank you for pointing that out though!