Skip to content

Commit 70ce753

Browse files
committed
fixed warning condition for distance metric
1 parent 5c1d5fb commit 70ce753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generic.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ end
934934
function lpdist(x::T, y::T, p::Real) where {T <: AbstractVector}
935935
length(x) == length(y) || throw(DimensionMismatch("x and y have different lenghts"))
936936
p < 0 && throw(DomainError("p must be non-negative"))
937-
p < 1 || @warn("Technically not a distance metric for 0 < p < 1")
937+
p < 1 && @warn("Technically not a distance metric for 0 < p < 1")
938938

939939
# handle inf norm separatey
940940
if p == Inf

0 commit comments

Comments
 (0)