You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
D:\AnacondaSoftware\lib\site-packages\mpl_toolkits\basemap_init_.py in _addcyclic(a)
5086 raise ValueError('The specified axis does not correspond to an '
5087 'array dimension.')
-> 5088 return npsel.concatenate((a,a[slicer]),axis=axis)
5089 def _addcyclic_lon(a):
5090 """addcyclic function for a single longitude array"""
IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices
The code is: psi_p1,lon1=addcyclic(np.array(psi_p),np.array(lon))
I am wondering whether it is due to inconsistency of package version? Is it possible to fix the bug without reinstall python or modules due to interdependence of a lot of my other modules. Thanks a lot!!
Hi @YixinNJU! This error sounds like #555, which was solved for basemap release 1.3.5. Can you try upgrading to the latest basemap version (currently 1.3.7)? The version 1.2.2 is a bit outdated. The version 1.3.7 is available at conda-forge for Windows x64 (presumably your OS and architecture).
Hi @YixinNJU! This error sounds like #555, which was solved for basemap release 1.3.5. Can you try upgrading to the latest basemap version (currently 1.3.7)? The version 1.2.2 is a bit outdated. The version 1.3.7 is available at conda-forge for Windows x64 (presumably your OS and architecture).
Thank you for your reply! I upgraded basemap to 1.3.7 and re-import the module, the same Index Error still exists.
Activity
molinav commentedon Jun 4, 2023
Hi @YixinNJU! This error sounds like #555, which was solved for
basemaprelease 1.3.5. Can you try upgrading to the latestbasemapversion (currently 1.3.7)? The version 1.2.2 is a bit outdated. The version 1.3.7 is available atconda-forgefor Windows x64 (presumably your OS and architecture).YixinNJU commentedon Jun 4, 2023
Thank you for your reply! I upgraded basemap to 1.3.7 and re-import the module, the same Index Error still exists.