Last active
January 18, 2020 00:46
-
-
Save cossatot/bb042e307e21134adba497179ca7f35e to your computer and use it in GitHub Desktop.
Jupyter notebook for a Bayesian inversion of critical wedge parameters
I see the problem now.
You need to run something like
priors['likelihood'] = priors.apply(calc_row_likelihood, axis=1)
instead of
priors = calc_row_likelihood(priors)
If it doesn't work exactly, read the error messages and try to understand them to find the problem.
Ok. Perfect.
Thank you. It work correctly.
Great, I am glad I could help. Good luck with your research!
Thank you.
El vie., 17 ene. 2020 a las 9:50, Richard Styron (<[email protected]>)
escribió:
… Great, I am glad I could help. Good luck with your research!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/bb042e307e21134adba497179ca7f35e?email_source=notifications&email_token=AHWRTLYOYUZYJI54K4CJRDDQ6HATRA5CNFSM4J4AVRAKYY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF7XZM#gistcomment-3141526>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHWRTLY5JXWKEUHH2JHMVLDQ6HATRANCNFSM4J4AVRAA>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, again...
=========
t_start = time.time()
priors = calc_row_likelihood(priors)
t_end = time.time()
print('done with {} calcs in {:.1f} seconds'.format(n_iters, (t_end - t_start)))
done with 100000 calcs in 0.1 seconds
C:\Users\vamaris\AppData\Local\Continuum\anaconda3\lib\site-packages\scipy\stats\stats.py:308: RuntimeWarning: divide by zero encountered in log
log_a = np.log(np.array(a, dtype=dtype))
priors['rel_likelihood'] = priors['likelihood'] / priors['likelihood'].max()
IndexError Traceback (most recent call last)
in
----> 1 priors['rel_likelihood'] = priors['likelihood'] / priors['likelihood'].max()
IndexError: invalid index to scalar variable.
priors.head()
AttributeError Traceback (most recent call last)
in
----> 1 priors.head()
AttributeError: 'numpy.float64' object has no attribute 'head'
As you see Im here.