I'm trying to run the example of Figure 6.6 (2nd edition: http://www.astroml.org/book_figures/chapter6/fig_EM_metallicity.html).
However, draw_ellipse seems to be missing. The error doesn't make sense to me:
ImportError: cannot import name 'LinearRegressionwithErrors' from 'astroML.linear_model' (/Users/gtr/opt/anaconda3/lib/python3.8/site-packages/astroML/linear_model/init.py)
However, I see "draw_ellipse" in tools.py at
~/anaconda3/lib/python3.8/site-packages/astroML/plotting
I managed to get it to work with by importing:
from matplotlib.patches import Ellipse
And then copying draw_elllipse from tools.py:
def draw_ellipse(mu, C, scales=[1, 2, 3], ax=None, **kwargs):
I also get the same error as in when importing setup_text plots:
from astroML.plotting import setup_text_plots
ImportError: cannot import name 'LinearRegressionwithErrors' from 'astroML.linear_model' (/Users/gtr/opt/anaconda3/lib/python3.8/site-packages/astroML/linear_model/init.py)
This is after updating (actually, installing fresh) astroML earlier this week, which appears to be v1.0.
--
You received this message because you are subscribed to the Google Groups "astroML-general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astroml-gener...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astroml-general/d0bbeab3-a374-4fde-b0e6-423d12467aa2o%40googlegroups.com.