[h5py] 265/455: Rename file attribute, update docs

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:40 UTC 2015


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

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit c3bf7d69783f84ffb405bf65511f09fe563d137e
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Tue Jun 2 20:57:54 2009 +0000

    Rename file attribute, update docs
---
 docs/source/guide/dataset.rst |  2 +-
 docs/source/guide/file.rst    |  2 +-
 docs/source/guide/group.rst   |  2 +-
 docs/source/guide/hl.rst      | 48 -------------------------------------------
 h5py/highlevel.py             |  4 ++--
 5 files changed, 5 insertions(+), 53 deletions(-)

diff --git a/docs/source/guide/dataset.rst b/docs/source/guide/dataset.rst
index fc2a076..e9a6775 100644
--- a/docs/source/guide/dataset.rst
+++ b/docs/source/guide/dataset.rst
@@ -180,7 +180,7 @@ Reference
 
         Provides access to HDF5 attributes; see :ref:`attributes`.
 
-    .. attribute:: fileobj
+    .. attribute:: file
         
         The ``File`` instance used to open this HDF5 file.
 
diff --git a/docs/source/guide/file.rst b/docs/source/guide/file.rst
index 9fbaa84..5cfd4a1 100644
--- a/docs/source/guide/file.rst
+++ b/docs/source/guide/file.rst
@@ -83,7 +83,7 @@ the full API of Group objects; in this case, the group in question is the
 
     See also :class:`Group`, of which this is a subclass.
 
-    .. attribute:: name
+    .. attribute:: filename
 
         HDF5 filename
 
diff --git a/docs/source/guide/group.rst b/docs/source/guide/group.rst
index cf63afa..cdccb7b 100644
--- a/docs/source/guide/group.rst
+++ b/docs/source/guide/group.rst
@@ -46,7 +46,7 @@ Reference
         Dictionary-like object which provides access to this group's
         HDF5 attributes.  See :ref:`attributes` for details.
 
-    .. attribute:: fileobj
+    .. attribute:: file
         
         The ``File`` instance used to open this HDF5 file.
 
diff --git a/docs/source/guide/hl.rst b/docs/source/guide/hl.rst
index 7094483..2bcbe7e 100644
--- a/docs/source/guide/hl.rst
+++ b/docs/source/guide/hl.rst
@@ -74,53 +74,5 @@ concurrency (and as it is not necessarily thread-safe), access to the library
 is automatically serialized.  The GIL is released around read/write operations
 so that non-HDF5 threads (GUIs, computation) can continue to execute.
 
-Metadata
---------
-
-Every object in HDF5 supports metadata in the form of "attributes", which are
-small, named bits of data.  :class:`Group`, :class:`Dataset` and even
-:class:`File` objects each carry a dictionary-like object which exposes this
-behavior, named ``<obj>.attrs``.  This is the correct way to store metadata
-in HDF5 files.
-
-
-
-
-
-.. _named_types:
-
-Named types
-===========
-
-There is one last kind of object stored in an HDF5 file.  You can store
-datatypes (not associated with any dataset) in a group, simply by assigning
-a NumPy dtype to a name::
-
-    >>> group["name"] = numpy.dtype("<f8")
-
-and to get it back::
-
-    >>> named_type = group["name"]
-    >>> mytype = named_type.dtype
-
-Objects of this class are immutable and have no methods, just read-only
-properties.
-
-Reference
----------
-
-.. class:: Datatype
-
-    .. attribute:: name
-
-        Full name of this object in the HDF5 file (e.g. ``/grp/MyType``)
-
-    .. attribute:: attrs
-
-        Attributes of this object (see :ref:`attributes section <attributes>`)
-
-    .. attribute:: dtype
-
-        NumPy dtype representation of this type
 
 
diff --git a/h5py/highlevel.py b/h5py/highlevel.py
index 9b50179..17cfc37 100644
--- a/h5py/highlevel.py
+++ b/h5py/highlevel.py
@@ -99,7 +99,7 @@ class HLObject(_LockableObject):
         return self._attrs
 
     @property
-    def fileobj(self):
+    def file(self):
         """Return the File instance associated with this object"""
         if isinstance(self, File):
             return self
@@ -113,7 +113,7 @@ class HLObject(_LockableObject):
         Beware; if multiple hard links to this object exist, there's no way
         to predict which parent group will be returned!
         """
-        return self.fileobj[pp.dirname(self.name)]
+        return self.file[pp.dirname(self.name)]
 
     def __init__(self, parent):
         if not isinstance(self, File):

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



More information about the debian-science-commits mailing list