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

A broken interactive example in the NumPy docs / add support for handling the .. plot:: directive #264

Open
agriyakhetarpal opened this issue Jan 29, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@agriyakhetarpal
Copy link
Member

Description

Post the merge of numpy/numpy#26745, I found a broken example in the NumPy docs: https://numpy.org/devdocs/reference/generated/numpy.percentile.html

Reproduce

  1. Go to https://numpy.org/devdocs/reference/generated/numpy.percentile.html
  2. Scroll down to the "Examples" section
  3. Click on the "Try it in your browser" button
  4. Scroll down in the notebook to see that the plot in the docs did not generate

The issue here is that we don't handle the .. plot:: directive properly – in this case, Numpydoc converts it to a .. code-block:: python directive with the HTML documentation.

Tap to show more

NumPy percentile example in an interactive notebook in the NumPy documentation. The plot directive has been converted to a Python code block directive and makes its way into the notebook

Expected behavior

The code should be a part of the interactive notebook, and the additional plot should be displayed upon running it

Context

  • JupyterLite version: N/a
  • Operating System and version: N/A
  • Browser and version: N/A
Browser Output

N/A

@agriyakhetarpal agriyakhetarpal added the bug Something isn't working label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant