-
Notifications
You must be signed in to change notification settings - Fork 22
Clean up verbose or old-style definitions #156
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #156 +/- ##
==========================================
- Coverage 92.99% 92.53% -0.46%
==========================================
Files 2 2
Lines 214 201 -13
==========================================
- Hits 199 186 -13
Misses 15 15
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supplementary notes
isfinite(c::Colorant) = mapreducec(isfinite, &, true, c) | ||
isinf(c::Colorant) = mapreducec(isinf, |, false, c) | ||
isnan(c::Colorant) = mapreducec(isnan, |, false, c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The specialization about Normed
seems to be unnecessary thanks to constant propagation.
(BTW, FixedPoint
would be more appropriate than Normed
.)
end | ||
|
||
# To help type inference | ||
promote_rule(::Type{T}, ::Type{C}) where {T<:Real,C<:AbstractGray} = promote_type(T, eltype(C)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to move this rule to ColorTypes.jl since it does exist.
However, I am not comfortable with this rule. 😕
I will address the issue #154 next, and in the meantime, if there are no comments on the issue #155, I will apply #155 (comment). I will then update the PR #153. |
This was written with care so as not to change the behavior, but I think it needs further review.
minor changes
Closes #124 (completely removed)