Skip to content
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

Fix bug in Taylor1 constructor for mixtures and add tests #343

Merged

Conversation

PerezHz
Copy link
Contributor

@PerezHz PerezHz commented Nov 29, 2023

Fixes #342. Essentially, fill was used in a Taylor1 constructor around here

v = fill(zero(x), order+1)

which according to the docs works fine when the underlying type is immutable, but causes issues for mutable types, such as Array.

@coveralls
Copy link

coveralls commented Nov 29, 2023

Coverage Status

coverage: 97.207%. remained the same
when pulling 272642c on PerezHz:jp/fix-Taylor1-constructor-mixtures
into 5895948 on JuliaDiff:master.

@lbenet
Copy link
Member

lbenet commented Nov 30, 2023

Thanks a lot! LGTM!

Two questions:

  • Are other instances where fill is used? (E.g., setting the coefficient of a TaylorN, or a HomogeneousPolynomial)?
  • Can you bump the patch version?

@PerezHz
Copy link
Contributor Author

PerezHz commented Nov 30, 2023

Are other instances where fill is used? (E.g., setting the coefficient of a TaylorN, or a HomogeneousPolynomial)?

I could not find any other occurrences of fill, I could only find one occurrence of fill! here:

fill!(coeffs, zero(aa))

It seems to be working properly; for completeness, added anyway a test of integrate for mixtures.

Can you bump the patch version?

Done! 😄

@lbenet
Copy link
Member

lbenet commented Dec 1, 2023

Excellent! Thanks for your contribution. I am merging it!

@lbenet lbenet merged commit 9a16131 into JuliaDiff:master Dec 1, 2023
12 checks passed
@PerezHz PerezHz deleted the jp/fix-Taylor1-constructor-mixtures branch February 25, 2024 14:14
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.

Bug in Taylor1 constructor for mixtures
3 participants