Skip to content

Commit 6f22c60

Browse files
Merge pull request #88 from JuliaMath/dw/tuple_vararg
Fix `Vararg` issue
2 parents f75b714 + 5980ad3 commit 6f22c60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/NaNMath.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,10 @@ end
406406

407407
# The functions `findmin`, `findmax`, `argmin`, and `argmax` are supported
408408
# to work correctly for the following iterable types:
409-
_valtype(x::AbstractArray{T}) where T<:AbstractFloat = eltype(x)
410-
_valtype(x::Tuple{Vararg{T} where T<:AbstractFloat}) = eltype(x)
411-
_valtype(x::NamedTuple{syms, <:Tuple{Vararg{T} where T<:AbstractFloat}}) where {syms} = eltype(x)
412-
_valtype(x::AbstractDict{K,T}) where {K,T<:AbstractFloat} = valtype(x)
409+
_valtype(x::AbstractArray{<:AbstractFloat}) = eltype(x)
410+
_valtype(x::Tuple{Vararg{AbstractFloat}}) = eltype(x)
411+
_valtype(x::NamedTuple{<:Any, <:Tuple{Vararg{AbstractFloat}}}) = eltype(x)
412+
_valtype(x::AbstractDict{<:Any,<:AbstractFloat}) = valtype(x)
413413
_valtype(x) = error(
414414
"Iterables with value type AbstractFloat or its subtypes are supported.
415415
The provided input type $(typeof(x)) is not.

0 commit comments

Comments
 (0)