Skip to content

Commit be68d56

Browse files
committed
Deprecate StatsBase
1 parent 4104dfc commit be68d56

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/ColorVectorSpace.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@ varm(v::AbstractArray{C}, s::AbstractGray; corrected::Bool=true) where {C<:Abstr
299299
varm(map(gray,v),gray(s); corrected=corrected)
300300
real(::Type{C}) where {C<:AbstractGray} = real(eltype(C))
301301

302-
#histrange for Gray type
303-
histrange(v::AbstractArray{Gray{T}}, n::Integer) where {T} = histrange(convert(Array{Float32}, map(gray, v)), n, :right)
304-
305302
# To help type inference
306303
promote_rule(::Type{T}, ::Type{C}) where {T<:Real,C<:AbstractGray} = promote_type(T, eltype(C))
307304

@@ -345,4 +342,12 @@ _precompile_()
345342
@deprecate (*)(A::AbstractArray{T}, b::TransparentGray) where {T<:Number} A.*b
346343
@deprecate (*)(b::TransparentGray, A::AbstractArray{T}) where {T<:Number} A.*b
347344

345+
## Deprecations
346+
347+
## From 2020-Sept-9
348+
# Since ImageContrastAdjustment is now doing its own binning, I think this can be safely deprecated and we can eliminate
349+
# the dependency on StatsBase.
350+
import StatsBase: histrange
351+
@deprecate histrange(v::AbstractArray{Gray{T}}, n::Integer) where {T} histrange(convert(Array{Float32}, map(gray, v)), n, :right)
352+
348353
end

0 commit comments

Comments
 (0)