Open mikedeltalima opened 4 years ago
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:
plot_rebit_posterior
plot_cov_ellipse
np.linalg.eigh
vecs
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]))
or, maybe theta = np.degrees(np.arctan2(*np.real_if_close(vecs)[:,0][::-1]))
theta = np.degrees(np.arctan2(*np.real_if_close(vecs)[:,0][::-1]))
In
plot_rebit_posterior
, the default setting is to callplot_cov_ellipse
, which usesnp.linalg.eigh
to find eigenvectors of the covariance. This can returnvecs
with complex entries, which then fail on line 146 ofplotting_tools.py
:Should it just take the real part? as in: