Skip to content

Commit

Permalink
Updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Sep 15, 2022
1 parent 43e750d commit 3f39ef1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@
Examples
********

Copy almost all files
=====================
Copy part of a file
====================

Suppose that you want to copy all but some dataset from a file.
In that case you can use

* :py:meth:`GooseHDF5.getdatasets` to get a list of all datasets.
* :py:meth:`GooseHDF5.copydatasets` to copy a bunch of datasets.
* :py:meth:`GooseHDF5.getdatapaths`
* :py:meth:`GooseHDF5.copy`

Consider the following example.

.. literalinclude:: examples/copy_modify-selection.py
:language: python

.. warning::
.. note::

The copy functions from *h5py* copy attributes as well.
By extension also :py:meth:`GooseHDF5.copydatasets` copies all attributes.
If you manipulate data yourself you will want to make sure that copy the relevant attributes.
The copy functions from *h5py* copy attributes as well.
By extension also :py:meth:`GooseHDF5.copy` copies all attributes.

0 comments on commit 3f39ef1

Please sign in to comment.