ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
120 stars 77 forks source link

Remove deprecated dump data types #1052

Closed StuartLittlefair closed 1 year ago

StuartLittlefair commented 1 year ago

Fixes #1051

NumPy v1.24.0 removed deprecated data types np.object, np.bool, np.float, np.complex, np.str, and np.int, meaning Ginga could no longer be used with the latest NumPy versions.

This PR removes these data types from Ginga in favour of the Python data types float, int, bool etc. According to the raised error in NumPy:

`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
StuartLittlefair commented 1 year ago

None whatsoever, I'm happy with either.

ejeschke commented 1 year ago

None whatsoever, I'm happy with either.

Then, would you mind changing it so they are consistent? Looks like not so many changes. Then I will merge it.

ejeschke commented 1 year ago

Looks good. Thanks, @StuartLittlefair !