Skip to content

Commit 3ac58bb

Browse files
merge datasets as multifile datasets
1 parent af8846d commit 3ac58bb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/multifile.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,6 @@ function MFDataset(TDS,fnames::AbstractArray{<:AbstractString,N},mode = "r";
130130
return mfds
131131
end
132132

133-
"""
134-
mfds = MFDataset(ds)
135-
136-
Virtually concatente a vector of AbstractDataset (`ds`) by merging the list
137-
of variables. Every variable which happend to be repeated in several datasets
138-
is assumed to be constant accorss all datasets.
139-
"""
140133
function MFDataset(ds::AbstractVector{<:AbstractDataset};
141134
aggdim = nothing,
142135
deferopen = true,
@@ -148,7 +141,14 @@ function MFDataset(ds::AbstractVector{<:AbstractDataset};
148141
MFDataset(ds,aggdim,isnewdim,Symbol.(constvars))
149142
end
150143

144+
"""
145+
mfds = merge(ds1, ds2...)
151146
147+
Virtually merge all datasets (`ds1`,...) by concatenating the list
148+
of variables. Every variable which happend to be repeated in several datasets
149+
is should to be constant in all datasets.
150+
"""
151+
Base.merge(ds::AbstractDataset...) = MFDataset(collect(ds); aggdim = "")
152152

153153
function close(mfds::MFDataset)
154154
close.(mfds.ds)

0 commit comments

Comments
 (0)