JuliaImages / JuliaImages/juliaimages.github.io
Should Gray be <: Number?
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 33
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
Since Gray{T} supports whatever numeric operations T supports, I think it is reasonable to make Gray <: Number so that code that accept Numbers also work with Gray. I personally encountered this problem when I tried to do DSP.conv between two grayscale images: since DSP.conv only works with arrays with eltype <: Number, I had to convert my arrays back and forth between Array{Gray{T}, 2} and Array{T, 2}.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the definition of Gray and the Number constraint used by DSP.conv, then check how Julia's numeric type hierarchy handles the proposed relationship. Done means the grayscale arrays work with DSP.conv without converting between Gray{T} and T, with coverage for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100