Skip to content

Commit

Permalink
Swap AbstractVariable to SubVariable
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz authored Jul 29, 2023
1 parent 66d1e67 commit 9656f1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/subvariable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function Base.view(v::SubVariable,indices::Union{Int,Colon,AbstractVector{Int}}.
end

"""
sv = view(v::NCDatasets.AbstractVariable,indices...)
sv = view(v::SubVariable,indices...)
Returns a view of the variable `v` where indices are only lazily applied.
No data is actually copied or loaded.
Expand All @@ -91,7 +91,7 @@ close(ds)
```
"""
Base.view(v::AbstractVariable,indices::Union{Int,Colon,AbstractVector{Int}}...) = SubVariable(v,indices...)
Base.view(v::SubVariable,indices::Union{Int,Colon,AbstractVector{Int}}...) = SubVariable(v,indices...)
Base.view(v::SubVariable,indices::CartesianIndex) = view(v,indices.I...)
Base.view(v::SubVariable,indices::CartesianIndices) = view(v,indices.indices...)

Expand Down

0 comments on commit 9656f1c

Please sign in to comment.