Skip to content

Commit 93f80a8

Browse files
committed
Re-export commonly used functions to top-level
1 parent cd2dd9e commit 93f80a8

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

src/evox/__init__.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
1-
__all__ = ["core", "utils", "algorithms", "problems", "workflows", "operators", "vis_tools", "metrics"]
1+
__all__ = [
2+
# modules
3+
"core",
4+
"utils",
5+
"algorithms",
6+
"problems",
7+
"workflows",
8+
"operators",
9+
"vis_tools",
10+
"metrics",
11+
# re-exported classes and functions
12+
"ModuleBase",
13+
"Mutable",
14+
"Parameter",
15+
"compile",
16+
"use_state",
17+
"vmap",
18+
]
219

3-
from . import algorithms, core, metrics, operators, problems, utils, vis_tools, workflows
20+
from . import core
21+
# re-export everything from core, so that users can access it directly
22+
from .core import ModuleBase, Mutable, Parameter, compile, use_state, vmap
23+
from . import algorithms, metrics, operators, problems, utils, vis_tools, workflows
424

525

626
# After that, try loading extensions from `evox_ext` package

0 commit comments

Comments
 (0)