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 inference failure #48

Merged
merged 1 commit into from
Aug 8, 2021
Merged

fix inference failure #48

merged 1 commit into from
Aug 8, 2021

Conversation

johnnychen94
Copy link
Member

This also fixes the CI error in JuliaImages/ImageQualityIndexes.jl#36 where channelview doesn't work on of_eltype(RGB{Float32, rand(Lab{Float32}, 4, 4)) because channelview assumes eltype to be concrete colorant, not Any.

I first notice this in JuliaMath/Interpolations.jl#446 (comment) but still, I'm really not sure what's behind the scene:

    infer_eltype() = Base._return_type(f, eltypes(data))
    T = infer_eltype()

closes #47

Copy link
Member

@timholy timholy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@johnnychen94 johnnychen94 merged commit 0e1b57f into master Aug 8, 2021
@johnnychen94 johnnychen94 deleted the jc/infer branch August 8, 2021 01:38
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.

of_eltype does not work for arrays of eltype Any (?)
2 participants