ajdawson / eofs

EOF analysis in Python
http://ajdawson.github.io/eofs/
GNU General Public License v3.0
199 stars 60 forks source link

Python collection issue with reconstructedField() #131

Closed jalder-usgs closed 8 months ago

jalder-usgs commented 2 years ago

Hello, I am using 1.4.0 of the API with Python 3.10.4 (numpy 1.22.3) and am having problems with eofs.standard.reconstructedField(). It gives the following error:

Traceback (most recent call last): File "/Users/alderj/code/Python/EOFs/Osman_EOF.py", line 33, in <module> reconstruction = solver.reconstructedField([1,2]) File "/Users/alderj/miniconda3/envs/IDLPython/lib/python3.10/site-packages/eofs/standard.py", line 638, in reconstructedField if isinstance(neofs, collections.Iterable): AttributeError: module 'collections' has no attribute 'Iterable'

A quick google indicates collections.Iterable is deprecated. Is there a work around? I'd really like to be able to add PC1 and PC2 in the original data units.

ajdawson commented 2 years ago

Try using the master branch it has the fix in https://github.com/ajdawson/eofs/commit/416ea0c135485ddd2cdf8e6d2b9f51a4d1cddc29

ajdawson commented 8 months ago

I believe this fix should be in 1.4.1