# How to prepare a large space for a 3d matrix in an hdf5 file

**URL:** <https://discourse.julialang.org/t/how-to-prepare-a-large-space-for-a-3d-matrix-in-an-hdf5-file/122234>\
**Category:** General Usage\
**Created:** [November 4, 2024, 4:20pm UTC](https://discourse.julialang.org/t/how-to-prepare-a-large-space-for-a-3d-matrix-in-an-hdf5-file/122234 "2024-11-04T16:20:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [November 4, 2024, 4:20pm UTC](https://discourse.julialang.org/t/how-to-prepare-a-large-space-for-a-3d-matrix-in-an-hdf5-file/122234/1 "2024-11-04T16:20:55Z")

</div>

Please Help! Unfortunately, AI doesn’t know how to do this.

In the HDF5 file, I need to prepare space for a 3d matrix 4500x9000x10000 Int64 to dynamically write and read data in different planes. The most frequently read portion of data will be the xy matrix, i.e. 4500x9000. How to prepare such a file?  
Paul

---

<div class="post-metadata">

**Author:** ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)\
**Post date:** [November 5, 2024, 7:29am UTC](https://discourse.julialang.org/t/how-to-prepare-a-large-space-for-a-3d-matrix-in-an-hdf5-file/122234/2 "2024-11-05T07:29:01Z")

</div>

I think you just set the chunk size appropriately (`(4500, 9000, 1)` maybe) as described in [Home · HDF5.jl](https://juliaio.github.io/HDF5.jl/stable/#Chunking-and-compression).
