We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
The test/test_drivers.py::test_plotting test is incompatible with matploitlib >= 3.8.0 resulting in an AttributeError:
test/test_drivers.py::test_plotting
AttributeError
================================== FAILURES =================================== ________________________________ test_plotting ________________________________ def test_plotting(): # Model definitions # ================= # Define a simple straight line function, parameters theta=(m,c) def f(x, theta): m, c = theta return m * x + c numpy.random.seed(1) # Posterior samples nsamples = 1000 ms = numpy.random.normal(loc=-5, scale=1, size=nsamples) cs = numpy.random.normal(loc=2, scale=1, size=nsamples) samples = numpy.array([(m, c) for m, c in zip(ms, cs)]).copy() # Prior samples ms = numpy.random.normal(loc=0, scale=5, size=nsamples) cs = numpy.random.normal(loc=0, scale=5, size=nsamples) prior_samples = numpy.array([(m, c) for m, c in zip(ms, cs)]).copy() # Examine the function over a range of x's xmin, xmax = -2, 2 nx = 100 x = numpy.linspace(xmin, xmax, nx) # Set the cache for cache in [None, 'cache/test']: if cache is not None: prior_cache = cache + '_prior' else: prior_cache = None # Plotting # ======== fig, axes = plt.subplots(2, 2) # Sample plot # ----------- ax_samples = axes[0, 0] ax_samples.set_ylabel(r'$c$') ax_samples.set_xlabel(r'$m$') ax_samples.plot(prior_samples.T[0], prior_samples.T[1], 'b.') ax_samples.plot(samples.T[0], samples.T[1], 'r.') # Line plot # --------- ax_lines = axes[0, 1] ax_lines.set_ylabel(r'$y = m x + c$') ax_lines.set_xlabel(r'$x$') plot_lines(f, x, prior_samples, ax_lines, color='b', cache=prior_cache) plot_lines(f, x, samples, ax_lines, color='r', cache=cache) # Predictive posterior plot # ------------------------- ax_fgivenx = axes[1, 1] ax_fgivenx.set_ylabel(r'$P(y|x)$') ax_fgivenx.set_xlabel(r'$x$') plot_contours(f, x, prior_samples, ax_fgivenx, colors=plt.cm.Blues_r, lines=False, cache=prior_cache) plot_contours(f, x, samples, ax_fgivenx, cache=cache) # DKL plot # -------- ax_dkl = axes[1, 0] ax_dkl.set_ylabel(r'$D_\mathrm{KL}$') ax_dkl.set_xlabel(r'$x$') ax_dkl.set_ylim(bottom=0) plot_dkl(f, x, samples, prior_samples, ax_dkl, cache=cache, prior_cache=prior_cache) > ax_lines.get_shared_x_axes().join(ax_lines, ax_fgivenx, ax_samples) E AttributeError: 'GrouperView' object has no attribute 'join'
To Reproduce Steps to reproduce the behavior:
conda create --name fgivenx python=3.11 fgivenx matplotlib-base=3.8.0 pytest conda activate fgivenx python3 -m pytest --pyargs fgivenx
Expected behavior
The test doesn't fail.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
pin tests to matplotlib < 3.8.0a0
1d37cc0
see handley-lab/fgivenx#22
No branches or pull requests
Describe the bug
The
test/test_drivers.py::test_plotting
test is incompatible with matploitlib >= 3.8.0 resulting in anAttributeError
:To Reproduce
Steps to reproduce the behavior:
Expected behavior
The test doesn't fail.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: