[python-hdf5storage] 127/152: Changed the setting of string array attributes to use str instead of np.bytes_ (unicode instead of ASCII).
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:24:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag 0.1
in repository python-hdf5storage.
commit 8df81751a17a2504c570a1e5c6fee5a43fa94c26
Author: Freja Nordsiek <fnordsie at gmail.com>
Date: Fri Feb 14 18:38:50 2014 -0500
Changed the setting of string array attributes to use str instead of np.bytes_ (unicode instead of ASCII).
---
hdf5storage/utilities.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/hdf5storage/utilities.py b/hdf5storage/utilities.py
index 2c352ee..21571a8 100644
--- a/hdf5storage/utilities.py
+++ b/hdf5storage/utilities.py
@@ -775,13 +775,12 @@ def set_attribute_string_array(target, name, string_list):
Dataset or Group to set the string array attribute of.
name : str
Name of the attribute to set.
- string_list : list, tuple
- List of strings to set the attribute to. Can be any string type
- that will convert to a ``numpy.bytes_``
+ string_list : list of str
+ List of strings to set the attribute to. Strings must be ``str``
"""
- target.attrs.create(name, np.bytes_(string_list),
- dtype=h5py.special_dtype(vlen=bytes))
+ target.attrs.create(name, string_list,
+ dtype=h5py.special_dtype(vlen=str))
def del_attribute(target, name):
--
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