File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -104,10 +104,15 @@ internal imports.
104
104
Use ` lazy.load ` to lazily import external libraries:
105
105
106
106
``` python
107
- linalg = lazy.load(' scipy.linalg' ) # `linalg` will only be loaded when accessed
107
+ sp = lazy.load(' scipy' ) # `sp` will only be loaded when accessed
108
+ sp.linalg.norm(... )
108
109
```
109
110
110
- You can also ask ` lazy.load ` to raise import errors as soon as it is called:
111
+ ** Note that lazily importing * sub* packages,
112
+ i.e. ` load('scipy.linalg') ` will cause the parent module to be
113
+ imported immediately, thus this usage is discouraged.**
114
+
115
+ You can ask ` lazy.load ` to raise import errors as soon as it is called:
111
116
112
117
```
113
118
linalg = lazy.load('scipy.linalg', error_on_import=True)
You can’t perform that action at this time.
0 commit comments