HDF5内部数据组织和NumPy使用

发布于 2024-10-01 12:55:53 字数 303 浏览 1 评论 0原文

正如 hdf5 文档所述,HDF5 使用 NumPy 存储数据

“它构建在 HDF5 库、Python 语言和 NumPy 包之上。它具有面向对象的接口,与 C 扩展相结合,可满足性能关键的需求部分代码,使其成为一种快速但极其易于使用的工具,用于交互式存储和检索大量数据”

...

“PyTables 使用这些 NumPy 容器作为内存缓冲区来将 I/O 带宽推向平台限制。”

那么机制是什么呢? PyTables 如何使用 NumPy?最后,它们生成可从其他语言访问的纯 hdf5...

as hdf5 documentation says, HDF5 stores data using NumPy

"It is built on top of the HDF5 library, the Python language and the NumPy package. It features an object-oriented interface that, combined with C extensions for the performance-critical parts of the code, makes it a fast yet extremely easy-to-use tool for interactively storing and retrieving very large amounts of data"

...

"PyTables uses these NumPy containers as in-memory buffers to push the I/O bandwith towards the platform limits."

So what's the mechanism? How does PyTables are using NumPy?In the end, they generate plain hdf5 accessible from other languages...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

坦然微笑 2024-10-08 12:55:53

HDF5是一个C语言库。 HDF5 以独立于平台的方式存储数字(包括浮点数)(向下滚动到标题为“本机数据类型和相应 C 类型的示例”的表,用户指南中有更多信息)。

PyTables 只是从 HDF5 数据类型转换为 NumPy 数据类型。并且它混合了 Python 代码和本机代码以减少 I/O 开销。

HDF5 is a C language library. HDF5 stores numbers, including floats, in a platform independent manner (scroll down to the table titled "Examples of Native Datatypes and Corresponding C Types," there's more information in the Users Guide).

PyTables simply converts from the HDF5 datatype to a NumPy datatype. And it mixes Python code and native code to reduce I/O overhead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文