Skip to content

DOC: add examples to polydiv docstring for edge cases - #31156

Closed
shch4747 wants to merge 1 commit into
numpy:mainfrom
shch4747:fix/polydiv-docstring
Closed

shch4747 wants to merge 1 commit into
numpy:mainfrom
shch4747:fix/polydiv-docstring

Conversation

@shch4747

@shch4747 shch4747 commented Apr 5, 2026

Copy link
Copy Markdown

PR summary

This pull request is connected to #18020. The pre-existing docstring for np.polydiv showed only one example. This adds two more:

  1. When the divisor has higher degree than the dividend — the result
    is a zero quotient with the dividend returned as remainder.
  2. A clean zero-remainder case using the factoring x²-1 = (x-1)(x+1),
    which makes the mathematical meaning of the output clear.

First time committer introduction

Second-Year MnC at IIT Delhi student. I use numpy for assigments and here-and-there ML work. I was looking for meaningful open-source contributions to make, came across #18020 but it had been quietly fixed. But noticed that the related docstring could be more comprehensive.

AI Disclosure

I used Claude (Anthropic) to help me navigate the codebase and understand the issue, but I wrote this PR description myself, verified the examples manually in a Python shell, and understand the change fully.

@jorenham

jorenham commented Apr 5, 2026

Copy link
Copy Markdown
Member

CI is failing

@mattip

mattip commented Jul 6, 2026

Copy link
Copy Markdown
Member

Closing, the PR seems abandoned. @shch4747 let us know if you wish to pick this up again, but please verify docs build locally with spin docs before resubmitting.

@mattip mattip closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants