Skip to content

Commit

Permalink
Always return heatmap batches as Vector{Matrix{RGB}}
Browse files Browse the repository at this point in the history
  • Loading branch information
adrhill committed Sep 29, 2023
1 parent eea546c commit 1af50fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/heatmap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function heatmap(
end
if process_batch
hs = _heatmap(val, cs, reduce, rangescale, permute)
return eachslice(hs; dims=3)
return [hs[:, :, i] for i in axes(hs, 3)]
end
return [_heatmap(v, cs, reduce, rangescale, permute) for v in eachslice(val; dims=4)]
end
Expand Down
2 changes: 1 addition & 1 deletion test/references/heatmaps/process_batch_true.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SubArray{ColorTypes.RGB{Float64}, 2, Array{ColorTypes.RGB{Float64}, 3}, Tuple{Base.Slice{Base.OneTo{Int64}}, Base.Slice{Base.OneTo{Int64}}, Int64}, true}[[RGB{Float64}(1.0,0.5714285714285714,0.5714285714285714) RGB{Float64}(1.0,0.4285714285714283,0.4285714285714283); RGB{Float64}(1.0,0.2857142857142856,0.2857142857142856) RGB{Float64}(1.0,0.1428571428571428,0.1428571428571428)], [RGB{Float64}(0.7142857142857142,0.0,0.0) RGB{Float64}(0.6428571428571428,0.0,0.0); RGB{Float64}(0.5714285714285714,0.0,0.0) RGB{Float64}(0.5,0.0,0.0)]]
Matrix{ColorTypes.RGB{Float64}}[[RGB{Float64}(1.0,0.5714285714285714,0.5714285714285714) RGB{Float64}(1.0,0.4285714285714283,0.4285714285714283); RGB{Float64}(1.0,0.2857142857142856,0.2857142857142856) RGB{Float64}(1.0,0.1428571428571428,0.1428571428571428)], [RGB{Float64}(0.7142857142857142,0.0,0.0) RGB{Float64}(0.6428571428571428,0.0,0.0); RGB{Float64}(0.5714285714285714,0.0,0.0) RGB{Float64}(0.5,0.0,0.0)]]

0 comments on commit 1af50fc

Please sign in to comment.