在 Julia 中调整 HDF5 数据集的大小

Bre*_*dan 5 hdf5 julia

有没有办法使用 Julia 的 HDF5.jl 调整 HDF5 中分块数据集的大小?我在文档中没有看到任何内容。查看源代码,我发现的只是set_dims!(),但不能扩展数据集(只能缩小它)。HDF5.jl 是否能够扩大现有(分块)数据集?这对我来说是一个非常重要的功能,我宁愿不必调用另一种语言。

ggg*_*ggg 3

该文档在下面的摘录中简要提到了可扩展的维度hdf5.md

您可以使用可扩展的尺寸,

d = d_create(parent, name, dtype, (dims, max_dims), "chunk", (chunk_dims), [lcpl, dcpl, dapl])
set_dims!(d, new_dims)
Run Code Online (Sandbox Code Playgroud)

其中 dims 是整数元组。例如

b = d_create(fid, "b", Int, ((1000,),(-1,)), "chunk", (100,)) #-1 is equivalent to typemax(Hsize)
set_dims!(b, (10000,))
b[1:10000] = [1:10000] 
Run Code Online (Sandbox Code Playgroud)