ajakef/gemlog

import gemlog runs into error with numpy 2.0.0

Closed this issue · 1 comments

After creating a new env and installing gemlog along with dependacies. Importing gemlog gives the error:

Traceback (most recent call last):
File "C:\Users...", line 14, in
import gemlog
File "C:\Users...\envs\gem\lib\site-packages\gemlog_init_.py", line 2, in
from gemlog.core import Convert, ReadGem, convert, read_gem, get_gem_specs
File "C:\Users...\envs\gem\lib\site-packages\gemlog\core.py", line 4, in
from numpy import NaN, Inf
ImportError: cannot import name 'NaN' from 'numpy' (C:\Users\phol916\AppData\Local\anaconda3\envs\gem\lib\site-packages\numpy_init_.py)

This occurs with numpy version 2.0.0 which installs as a dependancy, but not for earlier numpy versions (I tried with 1.26.4).

Thank you for reporting this. Numpy 2.0.0 made a backcompatibility-breaking change to eliminate NaN and Inf in favor of nan and inf, leading to the error you reported. Only minor changes not affecting functionality were required. Everything should work in version 1.7.10.