insarlab / MintPy

Miami InSAR time-series software in Python
https://mintpy.readthedocs.io
Other
560 stars 245 forks source link

Deprecated numpy.float usage in smallbaselineApp.py breaks with numpy > 1.24.0 #1132

Closed scikyle closed 7 months ago

scikyle commented 7 months ago

Running Linux Mint 21.2 with Python 3.8.12 in an Anaconda environment, Mintpy 1.5.0 and Numpy 1.24.3. While running a stack of ASF HyP3 Sentinel-1 IW images through a notebook, smallbaselineApp.py hits an error early in processing indicating AttributeError: module 'numpy' has no attribute 'float'.

After some searching, I found a similar error with a different library, and tried the suggested fix, rolling Numpy back to 1.23.4. After restarting the notebook environment using the regressed Numpy version, smallbaselineApp.py ran to successful completion.

Further searching suggested that np.float was a deprecated alias that has now expired, which is substantiated by the Numpy 1.24.0 release notes. The table in the Numpy 1.20.0 release notes, which introduced the deprecation, offers alternative suggestions.

welcome[bot] commented 7 months ago

👋 Thanks for opening your first issue here! Please filled out the template with as much details as possible. We appreciate that you took the time to contribute! Make sure you read our contributing guidelines.

yunjunz commented 7 months ago

The deprecated usage of numpy.int/float etc. has been fixed since version 1.5.1, please use the latest release or development version.