Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Oct 30, 2023
2 parents 18b1bce + d51ad82 commit 5c582d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/IntegrationTest.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: IntegrationTest
on:
push:
branches: [main]
tags: [v*]
pull_request:

concurrency:
Expand Down
8 changes: 4 additions & 4 deletions src/cfvariable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,15 @@ function Base.getindex(v::CFVariable, indexes::Union{Integer,Colon,AbstractRange
time_origin(v),time_factor(v),eltype(v))
end

function Base.setindex!(v::CFVariable,data::Array{Missing,N},indexes...) where N
function Base.setindex!(v::CFVariable,data::Array{Missing,N},indexes::Union{Int,Colon,AbstractRange{<:Integer}}...) where N
v.var[indexes...] = fill(fillvalue(v),size(data))
end

function Base.setindex!(v::CFVariable,data::Missing,indexes...)
function Base.setindex!(v::CFVariable,data::Missing,indexes::Union{Int,Colon,AbstractRange{<:Integer}}...)
v.var[indexes...] = fillvalue(v)
end

function Base.setindex!(v::CFVariable,data::Union{T,Array{T,N}},indexes...) where N where T <: Union{AbstractCFDateTime,DateTime,Union{Missing,DateTime,AbstractCFDateTime}}
function Base.setindex!(v::CFVariable,data::Union{T,Array{T,N}},indexes::Union{Int,Colon,AbstractRange{<:Integer}}...) where N where T <: Union{AbstractCFDateTime,DateTime,Union{Missing,DateTime,AbstractCFDateTime}}

if calendar(v) !== nothing
# can throw an convertion error if calendar attribute already exists and
Expand All @@ -414,7 +414,7 @@ function Base.setindex!(v::CFVariable,data::Union{T,Array{T,N}},indexes...) wher
end


function Base.setindex!(v::CFVariable,data,indexes...)
function Base.setindex!(v::CFVariable,data,indexes::Union{Int,Colon,AbstractRange{<:Integer}}...)
v.var[indexes...] = CFinvtransformdata(
data,fill_and_missing_values(v),
scale_factor(v),add_offset(v),
Expand Down

0 comments on commit 5c582d2

Please sign in to comment.