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

support zero-arg parametric constructor for Constant and Linear #442

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

johnnychen94
Copy link
Contributor

@johnnychen94 johnnychen94 commented Jul 13, 2021

ImageTransformations uses typeof(deg)() internally and it assumes the zero argument version constructor Linear{Throw{OnGrid}}() and Constant{Nearest,Throw{OnGrid}}() exist. So Interpolations v0.13.3 unfortunately breaks ImageTransformations 😢

I'm not sure if the bc field is necessary. (See my comments in https://github.com/JuliaMath/Interpolations.jl/pull/428/files#r668457028). This patch assumes that bc is needed and I added these constructor methods.


JuliaImages/ImageTransformations.jl#132 fixes the issue in ImageTransformations side, but I believe this is still useful.

@codecov
Copy link

codecov bot commented Jul 13, 2021

Codecov Report

Merging #442 (4d86a15) into master (a8370bd) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #442      +/-   ##
==========================================
+ Coverage   84.78%   84.81%   +0.02%     
==========================================
  Files          25       25              
  Lines        1643     1646       +3     
==========================================
+ Hits         1393     1396       +3     
  Misses        250      250              
Impacted Files Coverage Δ
src/b-splines/constant.jl 100.00% <100.00%> (ø)
src/b-splines/linear.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8370bd...4d86a15. Read the comment docs.

@mkitti
Copy link
Collaborator

mkitti commented Jul 13, 2021

Do we need a new release soon to address this?

@johnnychen94 johnnychen94 deleted the jc/zeroarg branch July 13, 2021 17:58
@johnnychen94
Copy link
Contributor Author

No need, I've fixed ImageTransformations by directly using the field value.

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