balbasty / nitorch

Neuroimaging in PyTorch
Other
83 stars 14 forks source link

API: batch import or user import? #3

Open balbasty opened 4 years ago

balbasty commented 4 years ago

The first one is more 'ease-of-use' oriented, while the second one is more 'performance-oriented' (as imports actually 'cost' something).

What should we do @brudfors?

brudfors commented 4 years ago

Personally, I prefer (if I understood the question correctly), e.g.:

from nitorch.utils import softmax

I like the look of it and that you have access to the function without having to call its namespace. If that is also better from a performance point of view, then maybe that settles it?