These are chat archives for SHTOOLS/SHTOOLS

Dec 2016
Mark Wieczorek
Dec 07 2016 16:26
All right: I need a little help. The file was way to long and hard to work with, so I split it into three files:, and However, shcoeffs requires the use of shgrid and vice-versus, and I keep running into errors complaining that the routines in one file can't find those in the other.
Could someone look quickly at the file pyshtools/shclasses/, as well as the import statements in pyshtools/shclasses/ and pyshtools/shclasses/ and let me know what I'm doing wrong? I've tried a hundred variations and can't figure it out.
As it is now, it appears that SHCoeffs correctly can find SHGrid, but not the other way around...
Dec 07 2016 17:20
Only import the module, don't import from the module:
does that work?
Mark Wieczorek
Dec 07 2016 22:31
I got it to work in python 3 by using from . import shcoeffs and then referring to shcoeffs.SHCoeffs in the file. However, this refuses to work in Python 2. There must be a solution, but I don't see it. Maybe someone who is used to python 2 has seen this before?