Skip to content

docs: fix forward-result comment in differentiable tensors example - #1102

Draft
nv-slang-bot[bot] wants to merge 1 commit into
mainfrom
dev/slangpy-fixer/docs-polynomial-comment
Draft

docs: fix forward-result comment in differentiable tensors example#1102
nv-slang-bot[bot] wants to merge 1 commit into
mainfrom
dev/slangpy-fixer/docs-polynomial-comment

Conversation

@nv-slang-bot

@nv-slang-bot nv-slang-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Standalone docs correction. In docs/src/tensors/differentiable.rst, "Basic Example: Polynomial Function", the Python block's forward-result comment showed the wrong values.

  • Wrong: # [9., 27., 53., 87.]
  • Right: # [9., 23., 41., 63.]

The example evaluates 2*x^2 + 8*x - 1 over x = [1, 2, 3, 4]:

  • x=1 → 2 + 8 − 1 = 9
  • x=2 → 8 + 16 − 1 = 23
  • x=3 → 18 + 24 − 1 = 41
  • x=4 → 32 + 32 − 1 = 63

The backward comment # [12., 16., 20., 24.] (= 4x + 8) is already correct and is left unchanged.

5-bullet summary

  • Status: Docs-only one-line fix; pushed, opened as draft PR.
  • Link: this PR.
  • Verdict: Stale forward-result comment corrected to match the arithmetic and the reporter's own output.
  • Next-action: Human maintainer to review and promote from draft.
  • Blocker: None.

Docs-only; no code, no test.

🤖 Generated by an automated SlangPy coworker — may be inaccurate. A human maintainer should verify.

The polynomial 2*x^2 + 8*x - 1 over x=[1,2,3,4] evaluates to
[9, 23, 41, 63], not [9, 27, 53, 87]. Correct the stale comment
in the 'Basic Example: Polynomial Function' section.
@jhelferty-nv

Copy link
Copy Markdown
Contributor

Automated notice (PR board sync) — do not reply to this comment.

Auto-assigned @jkiviluoto-nv as shepherd for this Bot PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants