Skip to content

Commit 15ba771

Browse files
committed
fixing the issue with max/min of strings columns
1 parent 81fecbd commit 15ba771

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/stat/stat.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ minimum(f, x::AbstractArray{Union{Missing, T},1}; threads = false) where T <: Un
77
minimum(f, x) = Base.minimum(f, x)
88
minimum(x::AbstractArray{Union{Missing, T},1}; threads = false) where T <: Union{INTEGERS, FLOATS, TimeType}= threads ? hp_minimum(identity, x) : stat_minimum(identity, x)
99
minimum(x) = Base.minimum(x)
10-
# not optimised for simd
11-
maximum(f, x::AbstractVector{Union{Missing, T}}) where T <: AbstractString = mapreduce(f, _stat_max_fun, x)
12-
minimum(f, x::AbstractVector{Union{Missing, T}}) where T <: AbstractString = mapreduce(f, _stat_min_fun, x)
13-
maximum(x::AbstractVector{Union{Missing, T}}) where T <: AbstractString = maximum(identity, x)
14-
minimum(x::AbstractVector{Union{Missing, T}}) where T <: AbstractString = minimum(identity, x)
10+
# TODO not optimised for simd - threads option is useless here / it is here because we have it for other types of data
11+
maximum(f, x::AbstractVector{Union{Missing, T}}; threads = false) where T <: AbstractString = mapreduce(f, _stat_max_fun, x)
12+
minimum(f, x::AbstractVector{Union{Missing, T}}; threads = false) where T <: AbstractString = mapreduce(f, _stat_min_fun, x)
13+
maximum(x::AbstractVector{Union{Missing, T}}; threads = false) where T <: AbstractString = maximum(identity, x)
14+
minimum(x::AbstractVector{Union{Missing, T}}; threads = false) where T <: AbstractString = minimum(identity, x)
1515

1616
sum(f, x::AbstractArray{Union{Missing, T},1}; threads = false) where T <: Union{INTEGERS, FLOATS} = threads ? hp_sum(f, x) : stat_sum(f, x)
1717
sum(f, x)=Base.sum(f, x)

0 commit comments

Comments
 (0)