unlimited dimensions in NetCDF
Maintainers usually reply within 9 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with the linked discussion in issue 79, then inspect DiskArray creation and the setindex! behavior described here. Work out the API for fixed versus growable dimensions, including bounds handling and type specialization. Done means the design is agreed and covered by tests for both fixed-size and growable arrays.
Written by the indexing model from the issue text.
Description
As a follow up of the discussion (https://github.com/Alexander-Barth/NCDatasets.jl/issues/79), I would like to know if unlimited dimensions (i.e. growable) could be supported by DiskArrays. I hope you it is OK for you that I make a separate issue here. It is easier for me to track what is already done and what still needs to be discussed.
The last proposition by Fabian has been:
Maybe it would help if I added a keyword argument checkbounds=false to the DiskArrays setindex implementation. So when you call setindex! in your DimensionallArrays code you can explicitly enforce bounds checking. In addition we can still discuss what the default behavior for any DiskArray should be...
I think this would be a good idea.
One could also annotate the type DiskArray with an additional parameter whether its size is fixed or not:
using Base: setindex!, size
struct FixedSize; end
struct MyArray{T,N,TFS} <: AbstractArray{T,N}; end
Base.size(A::MyArray) = (10,)
function fixedsize(::MyArray{T,N,TFS}) where {T,N,TFS}
return TFS == FixedSize
end
function Base.setindex!(A::MyArray,value,i::Int)
if fixedsize(A) && (i > 10)
error("you can't do that: the array has a fixed size")
end
println("ok ",i)
end
# growable array
A = MyArray{Int,1,Nothing}()
A[5] = 1
A[15] = 1
# fixed-size array
Af = MyArray{Int,1,FixedSize}()
Af[5] = 1
Af[15] = 1 # error
It is decided during creation of a DiskArray if the array can grow or not and all subsequent calls can use A[index] = value rather than setindex(A,value,index,checkbounds=true/false). The compile should be able to specialize for fixed and growable arrays (there could even be two definitions of setindex! for the two cases).
CC @rafaqz, @Balinus, @visr
- Dominant language
- Julia
- Stars
- 136
- Forks
- 30
- Avg merge
- 8d 22h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaIO/DiskArrays.jl
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaIO/DiskArrays.jl#306 ·
Maintainers usually reply within 9 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
JuliaIO/DiskArrays.jl#319 ·
Maintainers usually reply within 9 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
JuliaIO/DiskArrays.jl#307 · 2 reactions ·
Maintainers usually reply within 9 days
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
JuliaIO/DiskArrays.jl#303 ·
Maintainers usually reply within 9 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
JuliaIO/DiskArrays.jl#302 ·
Maintainers usually reply within 9 days
All issues in JuliaIO/DiskArrays.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Bump ODEInterface_jll to rebuilt 0.0.2+2 (execstack fix) in 8 benchmark folder ManifestsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
SciML/SciMLBenchmarks.jl#2044 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
oscar-system/Oscar.jl#6572 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
JuliaLang/LinearAlgebra.jl#2002 · 2 comments ·
Maintainers usually reply within 1 day