Awesome Open Source
Awesome Open Source

ElasticArrays.jl

License Build Status Codecov

ElasticArrays provides resizeable multidimensional arrays for Julia.

An ElasticArray is a fast, contiguous array that can grow and shrink, but only in its last dimension:

using ElasticArrays

A = ElasticArray{Int}(undef, 2, 3, 0)

for i in 1:4
    append!(A, rand(0:99, 2, 3))
end
size(A) == (2, 3, 4)

resize!(A, 2, 3, 2)
size(A) == (2, 3, 2)

However

resize!(A, 2, 4, 2)

would result in an error, as only the size of the last dimension may be changed.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
julia (693
arrays (31