Skip to content

Support promotion against Base AbstractUnitRanges #213

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

Merged
merged 1 commit into from
Jun 9, 2022
Merged

Conversation

timholy
Copy link
Member

@timholy timholy commented Jun 9, 2022

It's hard to support all AbstractUnitRange types unless one decides
the types here should "lose" to all other types. But we can support
the two most commonly used types.

It's hard to support all `AbstractUnitRange` types unless one decides
the types here should "lose" to all other types. But we can support
the two most commonly used types.
@codecov
Copy link

codecov bot commented Jun 9, 2022

Codecov Report

Merging #213 (ceadfc9) into master (aea5f34) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   92.28%   92.29%   +0.01%     
==========================================
  Files          14       14              
  Lines        1374     1376       +2     
==========================================
+ Hits         1268     1270       +2     
  Misses        106      106              
Impacted Files Coverage Δ
src/blockaxis.jl 97.60% <100.00%> (+0.03%) ⬆️

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 aea5f34...ceadfc9. Read the comment docs.

@dlfivefifty dlfivefifty merged commit 0551a95 into master Jun 9, 2022
@timholy timholy deleted the teh/promote branch June 9, 2022 21:16
timholy added a commit to JuliaImages/ImageCore.jl that referenced this pull request Jun 16, 2022
Previously `ZeroArrayPromise` required homogeneous axes,
this supports promotion prior to construction.
The test requires BlockArrays 0.16.17 (specifically
JuliaArrays/BlockArrays.jl#213)
but it's not a dependency of the package, so let's just
trust in the lack of conflicts.
@timholy
Copy link
Member Author

timholy commented Jun 16, 2022

Could we get a new release? Tests are failing in JuliaImages/ImageCore.jl#182

@dlfivefifty
Copy link
Member

Just tagged

@timholy
Copy link
Member Author

timholy commented Jun 16, 2022

Thanks! I was unsure whether #126 was breaking. Looks like there were some changes from == to in three of the existing tests.

@dlfivefifty
Copy link
Member

I wouldn’t consider that breaking, rather that the test was too strict: for a kronecker product I don’t think code should depend on getting the numbers correct up to floating point arithmetic. That is, if an algorithm is faster with a different order of multiplication that should be allowed.

@timholy
Copy link
Member Author

timholy commented Jun 16, 2022

Thanks for making the right call! I didn't follow the details so was unsure of the core cause. Agreed 100% with your reasoning.

timholy added a commit to JuliaImages/ImageCore.jl that referenced this pull request Jun 17, 2022
Previously `ZeroArrayPromise` required homogeneous axes
(all `AbstractUnitRange`s having the same type).
This supports promotion prior to construction.

The test requires BlockArrays 0.16.17 (specifically
JuliaArrays/BlockArrays.jl#213)
but it's not a dependency of the package, so let's just
trust in the lack of conflicts.
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