Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on using info command of MontePython to analyse chains #156

Open
nouicer opened this issue Oct 6, 2023 · 1 comment
Open

Error on using info command of MontePython to analyse chains #156

nouicer opened this issue Oct 6, 2023 · 1 comment

Comments

@nouicer
Copy link

nouicer commented Oct 6, 2023

I am facing an strange issue while using info to produce analyzes and plots of my txt outputs.
I suspected that it was the version of numpy that was not the right one (because of "normed" and "density" for the histograms). But I couldn't find a solution. Here is my error message and hope someone can help me.

Thank you so much

-> Computing histograms for Omega_m
Traceback (most recent call last):
File "/home/nouicer/montepython-3.6/montepython/MontePython.py", line 40, in
sys.exit(run())
^^^^^
File "/home/nouicer/montepython-3.6/montepython/run.py", line 31, in run
cosmo, data, command_line, success = safe_initialisation(
^^^^^^^^^^^^^^^^^^^^
File "/home/nouicer/montepython-3.6/montepython/run.py", line 191, in safe_initialisation
cosmo, data, command_line, success = initialise(custom_command)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nouicer/montepython-3.6/montepython/initialise.py", line 59, in initialise
analyze(command_line)
File "/home/nouicer/montepython-3.6/montepython/analyze.py", line 167, in analyze
compute_posterior(information_instances)
File "/home/nouicer/montepython-3.6/montepython/analyze.py", line 569, in compute_posterior
info.hist, info.bin_edges = np.histogram(
^^^^^^^^^^^^^
File "<array_function internals>", line 198, in histogram
TypeError: histogram() got an unexpected keyword argument 'normed'

@brinckmann
Copy link
Contributor

Dear user,
Your are raising issues on the old MontePython v1 and v2 repository (active in 2013-2018).
As clearly stated on this wiki, issue #55: since April 2018 and v3, the MontePython repository has moved to https://github.com/brinckmann/montepython_public
Please go there to clone a recent, working and maintained version of the code. Then, if necessary, please raise your issues in that repository.
(In this particular case, you are re-raising issue brinckmann#318 . This has been fixed on the devel branch and will be pushed public in the next version, in the meantime the issue provides the solution: anywhere in analyze.py where 'normed' is used for histogram or histogram2d it should use 'density' instead)
Best,
Thejs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants