# HDF5 variable length Array

**URL:** <https://discourse.julialang.org/t/hdf5-variable-length-array/101971>\
**Category:** General Usage\
**Tags:** hdf5\
**Created:** [July 23, 2023, 5:20pm UTC](https://discourse.julialang.org/t/hdf5-variable-length-array/101971 "2023-07-23T17:20:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomaskroi1996](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thomaskroi1996/32/49392_2.png) [@thomaskroi1996](https://discourse.julialang.org/u/thomaskroi1996)\
**Post date:** [July 23, 2023, 5:20pm UTC](https://discourse.julialang.org/t/hdf5-variable-length-array/101971/1 "2023-07-23T17:20:33Z")

</div>

Hello!

I was wondering what the cleanest way to write variable length arrays to HDF5 format in Julia, using HDF5.jl.

In python this can be easily done with

```julia
create_dataset('StepNumbers', data=[], dtype=np.dtype('uint32'), maxshape=(None,))

```

where we write a empty array as a placeholder, and specify with maxshape that the array that will eventually be written to it, will be of unknown size. is there a similar solution within the HDF5.jl package? I tried looking into dataspaces, and calling them in the create\_dataset function, i.e.

```julia
    step_numbers = create_dataset(grp_quantitiy, "StepNumbers", UInt32, dataspace=nothing)

```

which, at least as far as i can tell should have similar functionality, however i get thrown an invalid keyword error.

Appreciate any help, thank you!
