vtsuperdarn / davitpy

DEPRECATED The DaViT Python project
http://vtsuperdarn.github.com/davitpy/
GNU General Public License v3.0
37 stars 59 forks source link

tsygTrace example not working #332

Closed mariayanovskaya closed 4 years ago

mariayanovskaya commented 6 years ago

Hi all,

Trying to do "the porcelain way" example in the models.ipynb on OSX Sierra. I've run into a few issues.

In davitpy/davitpy/models/tsyganenko/init.py lines 349-357, the code will always fail with the error TypeError: slice indices must be integers or None or have an __index__ method

Also, I am using the already corrected version of init.py by @RichardoC.

Anyone have any ideas how to fix this?

Thanks

asreimer commented 6 years ago

This really sounds like a numpy version issue.

What is your numpy version? If you downgrade to 1.8, this issue will likely go away. It's caused by sloppy indexing, where we don't make sure that the variables used to index a numpy array are integers.

The temporary fix is to downgrade numpy. The proper fix is to ensure variables used to index the numpy arrays are integers.

mariayanovskaya commented 5 years ago

Currently, the installation script automatically updates all the modules, including numpy.

Maybe update the installation files such that the correct version of numpy is installed?

ksterne commented 4 years ago

It sounds like this is related to #316 and #358, so closing this issue because of that and because this repo is being deprecated.