telescope icon indicating copy to clipboard operation
telescope copied to clipboard

error message

Open hkoo87 opened this issue 2 years ago • 2 comments

Hello,

I was able to install telescope and wanted to run telescope test and got below error message:

(from print_summary in model.py:537) Traceback (most recent call last): File "/Users/opt/miniconda2/envs/telescope/bin/telescope", line 8, in sys.exit(main()) File "/Users/opt/miniconda2/envs/telescope/lib/python3.10/site-packages/telescope/main.py", line 95, in main args.func(args) File "/Users/opt/miniconda2/envs/telescope/lib/python3.10/site-packages/telescope/telescope_assign.py", line 247, in run ts_model = TelescopeLikelihood(ts.raw_scores, opts) File "/Users/opt/miniconda2/envs/telescope/lib/python3.10/site-packages/telescope/utils/model.py", line 597, in init self.Y = (self.Q.count(1) > 1).astype(np.int) File "/Users/opt/miniconda2/envs/telescope/lib/python3.10/site-packages/numpy/init.py", line 324, in getattr raise AttributeError(former_attrs[attr]) 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. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'inf'?

Any help will be appreciated.

hkoo87 avatar Nov 01 '23 23:11 hkoo87

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 . You can replace "np.int" with “int"

TLyan-ze avatar Nov 14 '23 00:11 TLyan-ze

I did not understand which file had to have this modification, but after a while I found "np.int" in "/users/userX/miniconda3/envs/telescope_env/lib/python3.10/site-packages/telescope/utils/model.py", so I modified that to "int", as suggested. This has made my version of telescope (1.0.3, from bioconda) work.

rodrigoduarte88 avatar Mar 23 '24 10:03 rodrigoduarte88