You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Running a simple evaluation of the QuadraticModel raises a numba TypingError. What's odd to me is that calling evaluate_ps doesn't raise any issue.
The issue itself is:
---------------------------------------------------------------------------TypingErrorTraceback (mostrecentcalllast)
<ipython-input-16-d3c5206936e9>in<module>1ldc=np.array([0.2, 0.4])
---->2flux=tm.evaluate(k=0.1, ldc=ldc, t0=0, p=1, a=3, i=np.pi/2, e=0, w=np.pi/2)
~/opt/anaconda3/envs/emperor/lib/python3.9/site-packages/pytransit/models/ma_quadratic.pyinevaluate(self, k, ldc, t0, p, a, i, e, w, copy)
131w=zeros(npv) ifwisNoneelsew132-->133flux=quadratic_model_v(self.time, k, t0, p, a, i, e, w, ldc,
134self.lcids, self.pbids, self.epids, self.nsamples, self.exptimes, self.npb,
135self.ed, self.ld, self.le, self.kt, self.zt, self.interpolate)
~/opt/anaconda3/envs/emperor/lib/python3.9/site-packages/numba/core/dispatcher.pyin_compile_for_args(self, *args, **kws)
418e.patch_message(msg)
419-->420error_rewrite(e, 'typing')
421excepterrors.UnsupportedErrorase:
422# Something unsupported is present in the user code, add help info~/opt/anaconda3/envs/emperor/lib/python3.9/site-packages/numba/core/dispatcher.pyinerror_rewrite(e, issue_type)
359raisee360else:
-->361raisee.with_traceback(None)
362363argtypes= []
TypingError: Failedinnopythonmodepipeline (step: nopythonfrontend)
NoimplementationoffunctionFunction(<functionatleast_1dat0x7ff5c5f89a60>) foundforsignature:
>>>atleast_1d(int64)
Thereare2candidateimplementations:
-Ofwhich2didnotmatchdueto:
Overloadoffunction'atleast_1d': File: numba/core/typing/npydecl.py: Line724.Withargument(s): '(int64)':
Nomatch.
During: resolvingcalleetype: Function(<functionatleast_1dat0x7ff5c5f89a60>)
During: typingofcallat/Users/jayvains/opt/anaconda3/envs/emperor/lib/python3.9/site-packages/pytransit/models/numba/ma_quadratic_nb.py (584)
File"../../../../opt/anaconda3/envs/emperor/lib/python3.9/site-packages/pytransit/models/numba/ma_quadratic_nb.py", line584:
defquadratic_model_v(t, k, t0, p, a, i, e, w, ldc, lcids, pbids, epids, nsamples, exptimes, npb, edt, ldt, let, kt, zt, interpolate):
p, a, i, e, w=atleast_1d(p), atleast_1d(a), atleast_1d(i), atleast_1d(e), atleast_1d(w)
^
This bug was caused by giving p as an integer instead of a float or an array of floats, and should be fixed now. Please pull the latest changes, reinstall, and give it a go :)
Describe the bug
Running a simple evaluation of the QuadraticModel raises a numba TypingError. What's odd to me is that calling evaluate_ps doesn't raise any issue.
The issue itself is:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the code to evaluate and produce a light curve
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: