Content-Length: 306522 | pFad | https://github.com/numpy/numpy/pull/28147

C2 DOC: Fix ambiguity in polyfit description by Uvi-12 · Pull Request #28147 · numpy/numpy · GitHub
Skip to content

DOC: Fix ambiguity in polyfit description #28147

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Uvi-12
Copy link
Contributor

@Uvi-12 Uvi-12 commented Jan 11, 2025

Fixes #28146

Clarified ambiguous usage of 'p' in polyfit documentation.

@@ -457,7 +457,7 @@ def polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False):
A summary of the differences can be found in the
:doc:`transition guide </reference/routines.polynomials>`.

Fit a polynomial ``p(x) = p[0] * x**deg + ... + p[deg]`` of degree `deg`
Fit a polynomial ``f(x) = p[0] * x**deg + ... + p[deg]`` of degree `deg`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be inclined to just remove p(x) = , I don't think replacing p by f improves it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Uvi-12 - I think I agree with @charris , we don't need a particular name for this polynomial.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright got it, shall I close the Pr then as no changes are required?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the suggestion is to remove p(x) so that it reads like this?

Suggested change
Fit a polynomial ``f(x) = p[0] * x**deg + ... + p[deg]`` of degree `deg`
Fit a polynomial ``p[0] * x**deg + ... + p[deg]`` of degree `deg`

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.

DOC: polyfit description uses "p" in two different ways
3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/numpy/numpy/pull/28147

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy