M
Modular16mo ago
JIMC

Cross-directory Imports

Simply put, how do I import Array defined in src/array/array.mojo from src/vector/vector.mojo?
No description
3 Replies
JIMC
JIMCOP16mo ago
@Jack Clayton do you have any answer for this?
Jack Clayton
Jack Clayton16mo ago
Hi @JIMC you need to have those two as subdirs of a pkg like:
No description
Jack Clayton
Jack Clayton16mo ago
Then in vector.mojo you can:
from ..array import Array
from ..array import Array

Did you find this page helpful?