Content-Length: 315640 | pFad | http://github.com/numpy/numpy/pull/28147/files

4E 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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion numpy/lib/_polynomial_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`

to points `(x, y)`. Returns a vector of coefficients `p` that minimises
the squared error in the order `deg`, `deg-1`, ... `0`.

Expand Down
Loading








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: http://github.com/numpy/numpy/pull/28147/files

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy