Closed gregmbi closed 2 years ago
We've been testing with newer versions of numpy (depending on Python version). What OS and Python versions are you using?
For instance, the last CI build was with numpy 1.19.2 on Python 3.6, 3.7, and 3.8 and 1.18.5 on Python 3.5 (and, of course numpy 1.16.6 for Python 2.7, as that was the last version of numpy for 2.7).
Ubuntu 18.04, Python 3.6.9, this problem seems to occur in a few places, for example: https://github.com/NVlabs/few-shot-vid2vid/issues/31 the thing is its confusing as it happens when you try to import the HistomicsTK, so you think that the problem is with it ...
The issue you linked seems to be when passing a float to linspace
, which expects an integer value. If you can cite a traceback where this occurs in HistomicsTK, we can guard against it. Looking at our code, I don't see any routes where that can happen.
Traceback (most recent call last): File "train.py", line 31, in <module> from histomicstk.preprocessing.color_deconvolution import color_deconvolution_routine File "/home/eri/cnvrg_env_phd_1_7/lib/python3.6/site-packages/histomicstk/__init__.py", line 7, in <module> from . import segmentation # must be imported before features File "/home/eri/cnvrg_env_phd_1_7/lib/python3.6/site-packages/histomicstk/segmentation/__init__.py", line 17, in <module> from . import nuclear File "/home/eri/cnvrg_env_phd_1_7/lib/python3.6/site-packages/histomicstk/segmentation/nuclear/__init__.py", line 10, in <module> from .detect_nuclei_kofahi import detect_nuclei_kofahi File "/home/eri/cnvrg_env_phd_1_7/lib/python3.6/site-packages/histomicstk/segmentation/nuclear/detect_nuclei_kofahi.py", line 4, in <module> import histomicstk.filters.shape as htk_shape_filters File "/home/eri/cnvrg_env_phd_1_7/lib/python3.6/site-packages/histomicstk/filters/__init__.py", line 7, in <module> from . import shape File "/home/eri/cnvrg_env_phd_1_7/lib/python3.6/site-packages/histomicstk/filters/shape/__init__.py", line 10, in <module> from .glog import glog File "/home/eri/cnvrg_env_phd_1_7/lib/python3.6/site-packages/histomicstk/filters/shape/glog.py", line 7, in <module> range=np.linspace(1.5, 3.0, np.round((3.0 - 1.5) / 0.2) + 1.0), File "<__array_function__ internals>", line 6, in linspace File "/home/eri/cnvrg_env_phd_1_7/lib/python3.6/site-packages/numpy/core/function_base.py", line 113, in linspace num = operator.index(num) TypeError: 'numpy.float64' object cannot be interpreted as an integer
This was fixed a long time ago (in #766).
I just spent half a day on this, seems like numpy > 1.17.5 is a bit broken, when installed it will break the simple import of this package. The solution is to install numpy==1.17.5 until this is fixed. Please update the install instructions accordingly