Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add lazy_loader #3173

Open
alexrockhill opened this issue Apr 5, 2024 · 2 comments · May be fixed by #3056
Open

ENH: Add lazy_loader #3173

alexrockhill opened this issue Apr 5, 2024 · 2 comments · May be fixed by #3056

Comments

@alexrockhill
Copy link
Contributor

alexrockhill commented Apr 5, 2024

A small issue but my import statements get pretty lengthy by importing every function at the top. mne implemented pretty recently lazy_loader so that you can do import dipy and then dipy.align.affine_registration without having to do import dipy.align as well but you don't have the memory hit of having to load all the submodules at initialization. This seems like a nice convenience and it's a small dependency and a couple of lines in each init file (see https://github.com/mne-tools/mne-python/blob/main/mne/decoding/__init__.py for instance). Maybe worth an hour to add this?

@skoudoro
Copy link
Member

skoudoro commented Apr 5, 2024

Hi @alexrockhill,

We are aware of this. See #3056

we just need time and to be careful with this. This is not high priority but it should be done this year.

@alexrockhill
Copy link
Contributor Author

Sorry only searched issues not PRs, thanks for the info

@skoudoro skoudoro linked a pull request Apr 5, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants