DASDAE / dascore

A python library for distributed fiber optic sensing
Other
72 stars 16 forks source link

numpy problem #432

Closed coutanto closed 5 days ago

coutanto commented 6 days ago

I just installed dascore using pip under conda env with python 3.11 (mac os sonoma)

The package requires an old version of numpy (1.26.4) that I had to remove to reinstall version 2.1.1 I ended up with errors in several function testing for np.NAN instead of np.nan: line: pulse_width_ns: float = np.NAN when NAN is replaced by nan, code runs fine

Sounds like recent versions of numpy do not accept any longer NAN instead of nan

files concerned: dascore-master/tests/test_proc/testfilter.py: = random_patch.pass_filter(time=[None, np.NAN]) dascore-master/dascore/io/xml_binary/core.py: pulse_width_ns: float = np.NAN dascore-master/dascore/io/dashdf5/core.py: pulse_width: float = np.NAN dascore-master/dascore/io/prodml/core.py: pulse_width: float = np.NAN

d-chambers commented 6 days ago

Hey @coutanto,

Unfortunately we had to pin numpy < 2 due to one of our dependencies (pytables) not yet supporting numpy v2. So, even if the NaN issues were resolved, DASCore would likely still not work because of this. However, the issue may have been resolved, I will check later today or tomorrow.

Is there a reason you need numpy v 2?