chihchunhsu / smart

Spectral Modeling Analysis and RV Tool
MIT License
7 stars 3 forks source link

New version of numpy doesn't use np.int #19

Closed ctheissen closed 1 year ago

ctheissen commented 1 year ago

Need to fix this throughout probably.

AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
chihchunhsu commented 1 year ago

What version of numpy are you using? Numpy has several backward-incompatible things that they changed but I haven't seen much benefits of using newer versions of numpy

ctheissen commented 1 year ago

1.24.2. We might need to think about some sort of version check.

chihchunhsu commented 1 year ago

I am using 1.21.6. Honesty I mostly stick with Python 3.7 for developing SMART since there was too much (unncessary) pain to deal with incompatible software upgrades.

Almost certain that your errors come from the wavelength calibration width computation. A simple fix is just to change np.int into int.

chihchunhsu commented 1 year ago

Just made the change; give it a try to see if that works in your environment!

chihchunhsu commented 1 year ago

Should be good now