Closed
Description
Since one(Gray)
is deprecated, it would be convenient that the following kind of usage isn't affected:
julia> ones(Gray{N0f8}, 4, 4)
┌ Warning: one(Gray{Normed{UInt8,8}}) will soon switch to returning 1; you might need to switch to `oneunit`
│ caller = ones at array.jl:462 [inlined]
└ @ Core .\array.jl:462
4×4 Array{Gray{N0f8},2} with eltype Gray{Normed{UInt8,8}}:
...
It is "easier" to read than Gray.(ones(N0f8, 4, 4))
.
P.S., this has the same issue in JuliaGraphics/Colors.jl#369 if we don't specify the concrete storage type.
julia> ones(Gray, 4, 4)
4×4 Array{Gray{Any},2} with eltype Gray:
Metadata
Assignees
Labels
No labels