HDF5 Python API

HDF5

Hierarchical Data Format (HDF) is a set of file formats (HDF4, HDF5) designed to store and organize large amounts of data.
Document for HDF5 Python API: https://docs.h5py.org/en/stable/build.html

Installation

Installation with conda:

conda install h5py

Installation with pre-built wheels

pip install h5py

Usage

import h5py

h5_file_name = "my_data.h5"
h5_writer = h5py.File(h5_file_name, 'a')  # indicate the file to store the data

for index in len(**YOUR_DATA_LIST**):
    set_intensity.create_dataset(f"{index:06}", data=**YOUR_DATA**) # save data

    if (index + 1) % 1500 == 0: # force to save once every 1500 records.
        print('Finish processing one section\n')
        h5_writer.close()
        time.sleep(1)
        h5_writer = h5py.File(h5_file_name, 'a')
        continue

# when finished!
h5_writer.close()

References

[1] https://en.wikipedia.org/wiki/Hierarchical_Data_Format
[2] https://docs.h5py.org/en/stable/build.html

Acknowledgement

Codes are from Qiuliang Ye

No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Previous
Next