Cannot import parts of modules ('GridArray' and 'examples')
Hello!
I was trying to run the "Grids" example notebook, but I get an import error in the first cell:
ImportError: cannot import name 'GridArray' from 'nata.containers'
I did some tests in the interactive shell, and from nata.containers import * works fine, but it apparently doesn't import the GridArray class:
I noticed the same kind of error with from nata import examples, by the way.
Any idea what this could be about? Thank you!
Hi @mtrocadomoreira! I think this may be because we have decided to expose the containers differently, through
from nata import GridArray
Unfortunately, I think we forgot to update the examples...
Can you give the import above a try?
I do think now we should keep the imports from the submodules, though, e.g. from nata.containers import ....
Hi @fabiocruz!
I tried your import, but I got the same error :/
ImportError: cannot import name 'GridArray' from 'nata' (/Users/Mariana/.venv/venv-nata-python3.8/lib/python3.8/site-packages/nata/__init__.py)
It's simply not importing GridArray, I don't understand why... When I try this:
import nata
dir(nata.containers)
I can see 'GridDataset' in there, but not 'GridArray', which seems very strange.