Thanks for the nice library! I have a module that implements a number of dataclasses based on xarray-dataclasses that I wanted to import quickly.
In order to accomplish this, I have a fork that implements lazy loading of numpy and xarray along these lines. To give you a rough sense for the resulting speedup, the initial import time drops from ~320 ms down to ~50 ms on my M2 macbook pro in python 3.9.
Do you think you may be interested in considering integrating this upstream? If so, I'd be happy to open a PR.
Thanks for the nice library! I have a module that implements a number of dataclasses based on
xarray-dataclassesthat I wanted to import quickly.In order to accomplish this, I have a fork that implements lazy loading of
numpyandxarrayalong these lines. To give you a rough sense for the resulting speedup, the initial import time drops from ~320 ms down to ~50 ms on my M2 macbook pro in python 3.9.Do you think you may be interested in considering integrating this upstream? If so, I'd be happy to open a PR.