Skip to content

BUG: Allow fitting of degree zero polynomials with Polynomial.fit#25984

Merged
mattip merged 4 commits intonumpy:mainfrom
eendebakpt:polynomial_single_datapoint
Aug 17, 2024
Merged

BUG: Allow fitting of degree zero polynomials with Polynomial.fit#25984
mattip merged 4 commits intonumpy:mainfrom
eendebakpt:polynomial_single_datapoint

Conversation

@eendebakpt
Copy link
Contributor

@eendebakpt eendebakpt commented Mar 10, 2024

For degenerate domains in Polynomial.fit (which occurs when all independent datapoints are equal) we expand the domain. This allows fitting of degree zero polynomials.

Fixes #25982

@eendebakpt eendebakpt changed the title Draft: BUG: Allow fitting of degree zero polynomials with Polynomial.fit BUG: Allow fitting of degree zero polynomials with Polynomial.fit Mar 10, 2024
@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Aug 16, 2024
@mattip mattip merged commit d3b1273 into numpy:main Aug 17, 2024
@mattip
Copy link
Member

mattip commented Aug 17, 2024

Thanks @eendebakpt

charris added a commit to charris/numpy that referenced this pull request Aug 17, 2024
Backport of numpy#25984.

For degenerate domains in Polynomial.fit (which occurs when all
independent datapoints are equal) we expand the domain. This allows
fitting of degree zero polynomials.

Fixes numpy#25982
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: np.polynomial.Polynomail.fit gets failed Singular Value Decomposition for deg=0 when there is only 1 datapoint to fit

3 participants