Skip to content

Commit

Permalink
update merge
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermebodin committed Sep 13, 2024
1 parent 0e81bfd commit 660f96a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/merge.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
function merge(
output_filename::String,
filenames::Vector{String},
impl::Type{<:Implementation},
impl::Type{<:Implementation};
digits::Union{Int, Nothing} = nothing,
)
readers = [Quiver.Reader{impl}(filename) for filename in filenames]
metadata = first(readers).metadata
Expand Down Expand Up @@ -34,7 +35,7 @@ function merge(
for label in current_label
if label in labels
iterator += 1
msg = "$(msg)[Error $iterator] Label $(label) in file $(reader.metadata.dimensions) is already in the merged labels.\n\n"
msg = "$(msg)[Error $iterator] Label $(label) in file $(first(readers).filename) is already in the merged labels.\n\n"
end
end
append!(labels, current_label)
Expand Down Expand Up @@ -71,7 +72,7 @@ function merge(
if all(isnan.(data))
continue
end
Quiver.write!(writer, data; dim_kwargs...)
Quiver.write!(writer, round_digits(data, digits); dim_kwargs...)
end

for reader in readers
Expand Down

0 comments on commit 660f96a

Please sign in to comment.