Skip to content

Commit fc628f4

Browse files
author
tungli
committed
on empty peaks: type fix
1 parent 3aaa850 commit fc628f4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/findpeaks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Macro specific to findpeaks function."
2525
macro on_empty_return(peaks, x)
2626
quote
2727
if isempty($(esc(peaks)))
28-
return (empty($(esc(x))), empty($(esc(x)), PeakInfo))
28+
return ((), ())
2929
end
3030
end
3131
end

test/findpeaks.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ end
104104
x1 = Int64[]
105105

106106
@test isempty(findpeaks(y1)[1])
107-
@test findpeaks(y1, x1)[1] == empty(x1)
107+
@test findpeaks(y1, x1)[1] == ()
108108

109109
y2 = Integer[]
110110
x2 = String[]
111111

112112
@test isempty(findpeaks(y2)[1])
113-
@test findpeaks(y2, x2)[1] == empty(x2)
113+
@test findpeaks(y2, x2)[1] == ()
114114
end
115115

116116
@testset "$NAME Non-equal data lengths" begin

0 commit comments

Comments
 (0)