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

ValueError: need at least one array to concatenate #17

Open
Amlan1996 opened this issue Aug 4, 2024 · 0 comments
Open

ValueError: need at least one array to concatenate #17

Amlan1996 opened this issue Aug 4, 2024 · 0 comments

Comments

@Amlan1996
Copy link

Hi,

I am trying to MCEvidence for the first regarding on of project which required the calculation of bayesian evidence. I ran W0-Wa CDM model in montepython and used the chains obtained from the run to calculate the evidence. However I am encountering the following error:

[amlan@nova MCEvidence]$ python MCEvidence.py /home/amlan/mp/chains/desi_ppb4/
INFO:MCEvidence.py.params_info():1235     getting params info from montepython log.params file
INFO:MCEvidence.py.get_prior_volume():1319     getting prior volume using cosmomc *.ranges or montepython log.param outputs
INFO:MCEvidence.py.get_prior_volume():1320     prior_volume=109.25839039999998
INFO:MCEvidence.py.get_prior_volume():1321     Number of params to use: ndim=8

Using file:  /home/amlan/mp/chains/desi_ppb4/
INFO:MCEvidence.py.setup():142      Loading chain from /home/amlan/mp/chains/desi_ppb4/
INFO:MCEvidence.py.load_from_file():595       loading files: /home/amlan/mp/chains/desi_ppb4/_?.txt
Traceback (most recent call last):
  File "MCEvidence.py", line 1469, in <module>
    thinlen=thinlen)
  File "MCEvidence.py", line 753, in __init__
    self.gd = MCSamples(method,csplit=csplit,debug=self.debug,**gdkwargs)
  File "MCEvidence.py", line 557, in __init__
    self.setup(str_or_dict,**kwargs)
  File "MCEvidence.py", line 143, in setup
    self.data = self.load_from_file(fileroot,**kwargs)            
  File "MCEvidence.py", line 606, in load_from_file
    return self.chains2samples(**kwargs)
  File "MCEvidence.py", line 197, in chains2samples
    self.ichain=np.concatenate([(i+1)*np.ones(len(c)) for i, c in enumerate(self.chains)])
  File "<__array_function__ internals>", line 6, in concatenate
ValueError: need at least one array to concatenate

It would be great if you could help me resolve this issue.

Best regards,
Amlan

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

1 participant