Closed melissa-hobson closed 2 years ago
Can you please update to the latest TLS version 1.0.28 and test again? pip install transitleastsquares --upgrade
It still crashes, with a similar error:
Transit Least Squares TLS 1.0.28 (13 June 2021) Creating model cache for 47 durations Searching 4800 data points, 10870 periods from 0.602 to 50.0 days Using all 8 CPU threads 0%| | 0/10870 periods | 00:00<?multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/home/mhobson/anaconda3/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/mhobson/anaconda3/lib/python3.7/site-packages/transitleastsquares/core.py", line 119, in search_period phases = foldfast(t, period) TypeError: expected dtype object, got 'numpy.dtype[float64]' """
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "
Sorry you're having trouble. We'll get this sorted out. I tried in in 3 different conda envs successsfully: Python 3.9.4 + numpy 1.21.0 + batman-package 2.4.8 + transitleastsquares 1.0.28 Python 3.7.2 + numpy 1.16.0 + batman-package 2.4.6 + transitleastsquares 1.0.28 Python 3.7.9 + numpy 1.21.0 + batman-package 2.4.8 + transitleastsquares 1.0.28 ==> This should be yours?
Can you give a list of all packages/versions using conda list
?
Can you test in a new env to check whether there is something broken in your env? I made a new env like this and it works. Can you try the same?
conda deactivate
conda update --force --all
conda create --name melissa python=3.7.9
conda activate melissa
pip install transitleastsquares
conda install matplotlib
python synth.py
Indeed, it seems to be a problem with my environment! The "conda update all" command is still trying to run (output of that and of "conda list" attached), but creating a new environment and running there it works fine. Thank you so much for your help!
Describe the bug Attempting to run the tutorial, it crashes with the following error message:
Traceback (most recent call last): File "/home/mhobson/anaconda3/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/home/mhobson/anaconda3/lib/python3.7/site-packages/transitleastsquares/core.py", line 119, in search_period phases = foldfast(t, period) TypeError: expected dtype object, got 'numpy.dtype[float64]'
Prior to the crash, there is a numpy warning message:Creating model cache for 37 durations /home/mhobson/anaconda3/lib/python3.7/site-packages/transitleastsquares/transit.py:157: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. lc_arr = numpy.array(lc_arr)
To Reproduce Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context My numpy version is 1.21. Looking up the warning message, I found this deprecation has been in effect since 1.19.0. I tried downgrading my numpy to 1.18.4, but then batman doesn't work.