<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hdf5 on shocksolution.com</title><link>https://shocksolution.com/tags/hdf5/</link><description>Recent content in Hdf5 on shocksolution.com</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 10 Jan 2010 23:00:20 +0000</lastBuildDate><atom:link href="https://shocksolution.com/tags/hdf5/index.xml" rel="self" type="application/rss+xml"/><item><title>Storing large Numpy arrays on disk: Python Pickle vs. HDF5</title><link>https://shocksolution.com/posts/storing-large-numpy-arrays-on-disk-python-pickle-vs-hdf5adsf/</link><pubDate>Sun, 10 Jan 2010 23:00:20 +0000</pubDate><guid>https://shocksolution.com/posts/storing-large-numpy-arrays-on-disk-python-pickle-vs-hdf5adsf/</guid><description>&lt;p&gt;&lt;a href="https://shocksolution.com/2008/09/15/python-pickle-painless-binary-storage-for-python-objects/" title="Python%20data%20storage%20with%20Pickle"&gt;In a previous post, I described how Python&amp;rsquo;s Pickle module is fast and convenient&lt;/a&gt; for storing all sorts of data on disk. More recently, I showed &lt;a href="https://shocksolution.com/2009/04/17/profiling-memory-usage-of-python-code/" title="Profiling%20Python%20code"&gt;how to profile the memory usage of Python code&lt;/a&gt;.  In recent weeks, I&amp;rsquo;ve uncovered a serious limitation in the Pickle module when storing large amounts of data: Pickle requires a large amount of memory to save a data structure to disk. Fortunately, there is an open standard called HDF, which defines a binary file format that is designed to efficiently store large scientific data sets. I will demonstrate both approaches, and profile them to see how much memory is required. I am writing the HDF file using the PyTables interface. Here&amp;rsquo;s the little test program I&amp;rsquo;ve been using: [code language=&amp;ldquo;Python&amp;rdquo;]#!/usr/bin/env python from numpy import array&lt;/p&gt;</description></item></channel></rss>