Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug summary
Inastropy/astropy#13209 a potential bug with v3.5.2 has been found wherein a previously working (e.g. in v3.5.1) plot of one of kernel objects now fails. This failure seems to stem fromplot
no-longer coercing the the kernel object correctly. This seems to be related to the changes in#22141. In any case we have an object with a valid__array__
method which was previously plotting correctly, but now produces a crash.
Code for reproduction
importmatplotlib.pyplotaspltfromastropy.convolutionimportGaussian1DKernelgauss_1D_kernel=Gaussian1DKernel(10)plt.plot(gauss_1D_kernel,drawstyle='steps')
Actual outcome
Traceback (mostrecentcalllast):File"/home/docs/checkouts/readthedocs.org/user_builds/astropy/envs/12943/lib/python3.9/site-packages/matplotlib/sphinxext/plot_directive.py",line517,in_run_codeexec(code,ns)File"<string>",line4,in<module>File"/home/docs/checkouts/readthedocs.org/user_builds/astropy/envs/12943/lib/python3.9/site-packages/matplotlib/pyplot.py",line2769,inplotreturngca().plot(File"/home/docs/checkouts/readthedocs.org/user_builds/astropy/envs/12943/lib/python3.9/site-packages/matplotlib/axes/_axes.py",line1632,inplotlines= [*self._get_lines(*args,data=data,**kwargs)]File"/home/docs/checkouts/readthedocs.org/user_builds/astropy/envs/12943/lib/python3.9/site-packages/matplotlib/axes/_base.py",line312,in__call__yieldfromself._plot_args(this,kwargs)File"/home/docs/checkouts/readthedocs.org/user_builds/astropy/envs/12943/lib/python3.9/site-packages/matplotlib/axes/_base.py",line500,in_plot_argsifx.ndim>2ory.ndim>2:
Expected outcome
See:https://docs.astropy.org/en/latest/_images/astropy-convolution-Gaussian1DKernel-1.png
Additional information
No response
Operating system
No response
Matplotlib Version
3.5.2
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
pip