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

Data type of posterior samples #1

Open
tomasstolker opened this issue Mar 31, 2023 · 0 comments
Open

Data type of posterior samples #1

tomasstolker opened this issue Mar 31, 2023 · 0 comments

Comments

@tomasstolker
Copy link

Hi @semaphoreP,

Thanks for maintaining this really helpful package!

I ran into the following error for pds70b:

line 222, in _newton_solver_wrapper
    eanom = _kepler._c_newton_solver(manom, ecc, tolerance=tolerance, max_iter=max_iter)
  File "orbitize/_kepler.pyx", line 18, in orbitize._kepler._c_newton_solver
ValueError: Buffer dtype mismatch, expected 'double_t' but got 'float'

The issue seems to be that the posterior samples that are read with get_chains have the numpy.float32 datatype while the orbitize function requires numpy.float64. For several other companions that I checked the datatype was already numpy.float64 so the error did not occur.

A simple solution would be adding dtype=np.float64 to post = np.array(hf.get('post')) in get_chains.

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