Is posible to add new line with Float but what about Strings Array? Somebody can help ?
Floats works like below:
fid = h5open("my_file.h5","w")
A = d_create(fid, "A", Float64, ((5,5),(-1,-1)), "chunk", (5,5))
A[:,:] = randn(5,5)
close(fid)
# add row
fid = h5open("my_file.h5","r+")
A = d_open(fid, "A")
set_dims!(A, (6,5)) # add new row
A[6,:] = -1.
k,l=size(A)# new size
close(fid)
works nice!
But…
julia> using JLD, HDF5
julia> fid = h5open("my_file.h5","w")
HDF5 data file: my_file.h5
julia> A = d_create(fid, "A", String, ((5,5),(-1,-1)), "chunk", (5,5))
ERROR: MethodError: no method matching datatype(::Type{String})
Closest candidates are:
datatype(::String) at C:\Users\PC\.julia\packages\HDF5\Zh9on\src\HDF5.jl:1173
datatype(::HDF5Attribute) at C:\Users\PC\.julia\packages\HDF5\Zh9on\src\HDF5.jl:1156
datatype(::HDF5Dataset) at C:\Users\PC\.julia\packages\HDF5\Zh9on\src\HDF5.jl:1154
...
Stacktrace:
[1] d_create(::HDF5File, ::String, ::Type, ::Tuple{Tuple{Int64,Int64},Tuple{Int64,Int64}}, ::String, ::Tuple{In
t64,Int64}) at C:\Users\PC\.julia\packages\HDF5\Zh9on\src\HDF5.jl:939
[2] top-level scope at REPL[3]:1
julia> A[:,:] = string.(randn(5,5))
ERROR: UndefVarError: A not defined
Stacktrace:
[1] top-level scope at REPL[4]:1
julia> read(fid)
Dict{String,Any} with 0 entries
julia> close(fid)
I must works with Array{String,2} and i nedd add some new rows Array{String,1}
Paul