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

plot_rebit_posterior raises TypeError #153

Open
mikedeltalima opened this issue Dec 5, 2019 · 1 comment
Open

plot_rebit_posterior raises TypeError #153

mikedeltalima opened this issue Dec 5, 2019 · 1 comment

Comments

@mikedeltalima
Copy link

In plot_rebit_posterior, the default setting is to call plot_cov_ellipse, which uses np.linalg.eigh to find eigenvectors of the covariance. This can return vecs with complex entries, which then fail on line 146 of plotting_tools.py:

theta = np.degrees(np.arctan2(*vecs[:,0][::-1]))

Should it just take the real part? as in:

theta = np.degrees(np.arctan2(*vecs.real[:,0][::-1]))
@mikedeltalima
Copy link
Author

or, maybe theta = np.degrees(np.arctan2(*np.real_if_close(vecs)[:,0][::-1]))

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