As suggested by @timholy in #17, this PR changes mappedarray(c->convert(T,c), img) to of_eltype(T, img). It results
in MappedArray instead of ReadonlyMappedArray, and it is more descriptive too.
This PR does not deal with #17, but I can confirm that the issue seems to be fixed already (which @johnnychen94 noticed before) and can be closed:
julia> using Augmentor, Test
julia> img = testpattern();
julia> @inferred(augment(img, ConvertEltype(Gray))) |> summary # Gray{Any}
"300×400 Array{Gray,2} with eltype Gray"
julia> pl = SplitChannels() |> ConvertEltype(Gray)
2-step Augmentor.ImmutablePipeline:
1.) Split colorant into its color channels
2.) Convert eltype to Gray
julia> @inferred(augment(img, pl)) |> summary # Gray{N0f8}
"4×300×400 Array{Gray{N0f8},3} with eltype Gray{FixedPointNumbers.N0f8}"
As suggested by @timholy in #17, this PR changes
mappedarray(c->convert(T,c), img)
toof_eltype(T, img)
. It results inMappedArray
instead ofReadonlyMappedArray
, and it is more descriptive too.This PR does not deal with #17, but I can confirm that the issue seems to be fixed already (which @johnnychen94 noticed before) and can be closed: