Fix documentation rendering for dpnp.ndarray operator methods and dpnp.histogram2d - #3064
Open
antonwolfy wants to merge 4 commits into
Open
Fix documentation rendering for dpnp.ndarray operator methods and dpnp.histogram2d#3064antonwolfy wants to merge 4 commits into
antonwolfy wants to merge 4 commits into
Conversation
The operator dunder docstrings wrapped their expressions in a :math:
role with \text{...}. In LaTeX/MathJax math mode this breaks on
special characters: '&' is an alignment char, '^' is superscript, and
'%' starts a comment. As a result __and__, __xor__, __mod__ and their
in-place/reflected variants rendered as errors or truncated text.
Render these Python operator expressions as inline code literals
instead, which is both correct and more appropriate than math markup.
antonwolfy
force-pushed
the
fix-histogram2d-returns-blank-line
branch
from
September 8, 2026 12:44
fce72fe to
1af3ad8
Compare
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/3064/index.html |
antonwolfy
marked this pull request as ready for review
September 8, 2026 13:42
antonwolfy
requested review from
ndgrigorian and
vlad-perevezentsev
as code owners
September 8, 2026 13:42
antonwolfy
marked this pull request as draft
September 8, 2026 13:45
antonwolfy
marked this pull request as ready for review
September 8, 2026 13:51
Contributor
|
Array API standard conformance tests for dpnp=0.21.0dev8=py314ha0e2e8e_5 ran successfully. |
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes several documentation rendering issues.
dpnp.ndarrayoperator methods documented their behavior with a:math:role wrapping the expression in\text{...}. In LaTeX/MathJax math mode&,^, and%are special, so__and__,__xor__,__mod__and their variants rendered as error strings or truncated text. These are plain Python operator snippets, so they now render as inline code literals; all operator dunder docstrings were converted for consistency.dpnp.histogram2danddpnp.left_shiftwere missing the blank line before theirReturnssection, so numpydoc did not parse it as a section header.Checklist