Skip to content

DOC: add Examples section to np.ma.polyfit [skip actions] - #31907

Merged
mattip merged 2 commits into
numpy:mainfrom
shoumikchakravarty-dev:doc/add-examples-ma-polyfit
Jul 8, 2026
Merged

mattip merged 2 commits into
numpy:mainfrom
shoumikchakravarty-dev:doc/add-examples-ma-polyfit

Conversation

@shoumikchakravarty-dev

Copy link
Copy Markdown
Contributor

PR summary

Adds a proper Examples section to np.ma.polyfit and converts its docstring from the doc_note wrapper pattern to a self-contained standalone docstring, matching the style already used by np.ma.ediff1d, np.ma.convolve, and other functions in the module.

First time committer introduction

No. Previous contributions
#31802
#31852

AI Disclosure

An AI assistant (Anthropic's Claude, via the Claude desktop app) was used to locate np.ma.polyfit as a function whose docstring lacked masked-array-specific examples, draft the standalone docstring and three examples, and verify they pass as doctests

@mattip

mattip commented Jul 8, 2026

Copy link
Copy Markdown
Member

Nice. I like it that you only show the mask effect, without diving into what polyfit does since that is covered elsewhere. There is a linting error: too many new lines at the end of the file, since you removed a line but not the newlines before it.

@shoumikchakravarty-dev

Copy link
Copy Markdown
Contributor Author

@mattip - Good catch. I have updated the changes. please review further.

@shoumikchakravarty-dev
shoumikchakravarty-dev marked this pull request as ready for review July 8, 2026 14:34
@mattip
mattip merged commit 2538439 into numpy:main Jul 8, 2026
2 checks passed
@mattip

mattip commented Jul 8, 2026

Copy link
Copy Markdown
Member

Thanks @shoumikchakravarty-dev

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