Skip to content

Commit

Permalink
accept dimensions names as symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Oct 30, 2023
1 parent 0b8d4db commit 9cd272f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/variable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ end

function _defVar(ds::AbstractDataset,name::SymbolOrString,data,nctype,vardimnames; attrib = [], kwargs...)
# define the dimensions if necessary
for (i,dimname) in enumerate(vardimnames)
for (i,dimname) in enumerate(String.(vardimnames))
if !(dimname in dimnames(ds))
@debug "define dimension" dimname dimnames(ds)
defDim(ds,dimname,size(data,i))
elseif !(dimname in unlimited(ds))
dimlen = dim(ds,dimname)
Expand Down

0 comments on commit 9cd272f

Please sign in to comment.