pyraf icon indicating copy to clipboard operation
pyraf copied to clipboard

Incompatible with numpy 2.0

Open LHe496 opened this issue 7 months ago • 0 comments

In numpy 2.0, it is not allowed to convert out-of-bound Python integers to integer arrays. In numpy 1.26.4, it is just a deprecation warning. The code influenced by such change that I found so far is the 'init' method for class 'IrafHatchFills' in file gki.py, which causes an error when using splot in pyraf.

It is recommanded by numpy to use 'np.array(value).astype(dtype)' rather than simply convert it to an array.

截图 2024-07-31 17-14-35

using the way numpy recommanded: image

LHe496 avatar Jul 31 '24 09:07 LHe496