[python-hdf5storage] 83/84: Updated documentation for version 0.1.10 which added the ability to write and read more than one piece of data at once.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:25:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 0.1.10
in repository python-hdf5storage.

commit ce832b68f0b318196798bb794202edfde9420587
Author: Freja Nordsiek <fnordsie at gmail.com>
Date:   Sun Nov 29 16:55:40 2015 +0100

    Updated documentation for version 0.1.10 which added the ability to write and read more than one piece of data at once.
---
 README.rst                  |  8 ++++++++
 doc/source/hdf5storage.rst  | 16 +++++++++++++++-
 doc/source/introduction.rst | 27 +++++++++++++++++++++++++--
 3 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/README.rst b/README.rst
index ebf765d..42b648e 100644
--- a/README.rst
+++ b/README.rst
@@ -213,6 +213,14 @@ canonical empty  0.1      ``np.float64([])``
 Versions
 ========
 
+0.1.10. Minor feature/performance fix release doing the following.
+        * Issue #29. Added ``writes`` and ``reads`` functions to write
+          and read more than one piece of data at a time and made
+          ``savemat`` and ``loadmat`` use them to increase performance.
+          Previously, the HDF5 file was being opened and closed for
+          each piece of data, which impacted performance, especially
+	  for large files.
+
 0.1.9. Bugfix and minor feature release doing the following.
        * Issue #23. Fixed bug where a structured ``np.ndarray`` with
          a field name of ``'O'`` could never be written as an
diff --git a/doc/source/hdf5storage.rst b/doc/source/hdf5storage.rst
index b0ddff1..16172fb 100644
--- a/doc/source/hdf5storage.rst
+++ b/doc/source/hdf5storage.rst
@@ -6,9 +6,11 @@ hdf5storage
 .. automodule:: hdf5storage
 
 .. autosummary::
-
+   
    write
+   writes
    read
+   reads
    savemat
    loadmat
    Options
@@ -21,12 +23,24 @@ write
 .. autofunction:: write
 
 
+writes
+------
+
+.. autofunction:: writes
+
+
 read
 -----
 
 .. autofunction:: read
 
 
+reads
+-----
+
+.. autofunction:: reads
+
+
 savemat
 -------
 
diff --git a/doc/source/introduction.rst b/doc/source/introduction.rst
index 9b74ca0..6ceb180 100644
--- a/doc/source/introduction.rst
+++ b/doc/source/introduction.rst
@@ -16,8 +16,9 @@ Lower level functionality needed mostly for extending this package to
 work with more datatypes are in its submodules.
 
 The main functions in this module are :py:func:`write` and
-:py:func:`read` which write a Python variable to an HDF5 file or read
-the specified contents of an HDF5 file and convert to Python types.
+:py:func:`read` which write a single Python variable to an HDF5 file or
+read the specified contents at one location in an HDF5 file and convert
+to Python types.
 
 HDF5 files are structured much like a Unix filesystem, so everything can
 be referenced with a POSIX style path, which look like
@@ -40,6 +41,28 @@ read back into the variable ``bar`` ::
 
     bar = hdf5storage.read(path='/foo', filename='data.h5')
 
+Writing And Reading Several Python Variables at Once
+====================================================
+
+To write and read more than one Python variable, one could use
+:py:func:`write` and :py:func:`read` for each variable individually.
+This can incur a major performance penalty, especially for large HDF5
+files, since each call opens and closes the HDF5 file (sometimes more
+than once).
+
+Version ``0.1.10`` added a way to do this without incuring this
+performance penalty by adding two new functions: :py:func:`writes` and
+:py:func:`reads`.
+
+They can write and read more than one Python variable at once, though
+they can still work with a single variable. In fact, :py:func:`write`
+and :py:func:`read` are now wrappers around them. :py:func:`savemat`
+and :py:func:`loadmat` currently use them for the improved performance.
+
+.. versionadded:: 0.1.10
+   
+   Ability to write and read more than one Python variable at a time
+   without opening and closing the HDF5 file each time.
 
 Main Options Controlling Writing/Reading Data
 =============================================

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-hdf5storage.git



More information about the debian-science-commits mailing list