[h5py] 19/26: Add missing lcpl for dataset creation (issue 139).
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:20:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag 1.3.1
in repository h5py.
commit 3b23bc990c6d358574fa92eab9de5d9aa14c77a9
Author: andrewcollette <andrew.collette at gmail.com>
Date: Sun Nov 28 20:25:53 2010 +0000
Add missing lcpl for dataset creation (issue 139).
---
h5py/highlevel.py | 5 ++++-
h5py/tests/high/test_group.py | 8 ++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/h5py/highlevel.py b/h5py/highlevel.py
index d3f6370..d103c47 100644
--- a/h5py/highlevel.py
+++ b/h5py/highlevel.py
@@ -1092,7 +1092,10 @@ class Dataset(HLObject):
space_id = h5s.create_simple(shape, maxshape)
type_id = h5t.py_create(dtype, logical=True)
- id = h5d.create(group.id, name, type_id, space_id, plist)
+ if config.API_18:
+ id = h5d.create(group.id, name, type_id, space_id, dcpl=plist, lcpl=self._lcpl)
+ else:
+ id = h5d.create(group.id, name, type_id, space_id, dcpl=plist)
if data is not None:
id.write(h5s.ALL, h5s.ALL, data)
HLObject.__init__(self, id)
diff --git a/h5py/tests/high/test_group.py b/h5py/tests/high/test_group.py
index 7ca0eb6..b215772 100644
--- a/h5py/tests/high/test_group.py
+++ b/h5py/tests/high/test_group.py
@@ -95,6 +95,14 @@ class TestDataset(GroupBase):
ds = self.f.create_dataset("Dataset", shape=(10,10), dtype='<i4')
self.assertIsInstance(ds, h5py.Dataset)
self.assert_("Dataset" in self.f)
+
+ @tests.require(api=18)
+ def test_dataset_intermediate(self):
+ """ (Group) Create dataset with missing intermediate groups """
+ ds = self.f.create_dataset("/a/b/Dataset", shape=(10, 10), dtype='<i4')
+ self.assertIsInstance(ds, h5py.Dataset)
+ self.assert_("/a/b/Dataset" in self.f)
+
class TestDict(GroupBase):
--
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