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

cprobability exception #58

Open
SquirrelKnight opened this issue Jan 20, 2019 · 3 comments
Open

cprobability exception #58

SquirrelKnight opened this issue Jan 20, 2019 · 3 comments
Assignees

Comments

@SquirrelKnight
Copy link

Please fill in the following details as much as possible when submitting your issue as this will help with testing and reproducing the issue

Environment Information

{
"version": "1.0.5",
"c_extensions present": [
"cmarkov_chain_monte_carlo",
"cprobability",
"cmoment_tensor_conversion",
"cscatangle"
],
"platform": "darwin",
"num_threads": 8,
"python version": "3.7.1 (default, Dec 14 2018, 13:28:58) \n[Clang 4.0.1 (tags/RELEASE_401/final)]",
"python version info": [
3,
7,
1,
"final",
0
],
"dependency info": {
"numpy": "1.15.4",
"scipy": "1.1.0",
"matplotlib": "3.0.2",
"cython": "0.29.2",
"sphinx": "1.8.2",
"h5py": "2.8.0"
}
}

What error you are getting

Error running cython code
Traceback (most recent call last):
File "/Users/jesse/anaconda3/lib/python3.7/site-packages/MTfit/probability/probability.py", line 871, in ln_marginalise
return cprobability.ln_marginalise(ln_pdf.astype(np.float64))
File "src/MTfit/probability/cprobability.pyx", line 130, in MTfit.probability.cprobability.ln_marginalise
ValueError: Buffer has wrong number of dimensions (expected 2, got 1)
Error running cython code
Traceback (most recent call last):
File "/Users/jesse/anaconda3/lib/python3.7/site-packages/MTfit/probability/probability.py", line 1269, in exp
return cprobability.ln_exp(self._ln_pdf)
File "src/MTfit/probability/cprobability.pyx", line 1817, in MTfit.probability.cprobability.ln_exp
ValueError: Buffer has wrong number of dimensions (expected 1, got 2)

What behaviour you would expect

To not get the errors, hopefully!

Reproduction steps

This occurs after every inversion I have attempted. I could send in the input pickle file to see if the issue can be reproduced.

@djpugh
Copy link
Owner

djpugh commented Jan 20, 2019

Hi @SquirrelKnight, thanks for this - I will have a look to see if I can reproduce it - is this blocking the run (it should try again if an error is thrown) - I think I have reproduced and it is an "expected" error - I'll update the code so that it is caught

@djpugh djpugh self-assigned this Jan 20, 2019
@SquirrelKnight
Copy link
Author

Hi @djpugh ,

It doesn't block the program, and I still seem to get results just fine.

@djpugh
Copy link
Owner

djpugh commented Jan 27, 2019

I've updated the logging to make it clearer about the errors not being important - #60 - need to fix some tests which I may have a chance to do soon, but both this error and the one in #59 should be handled more nicely

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