[python-hdf5storage] 20/152: Fixed but in complex type encoding where type was not kept constant.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:24:30 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 7631790cdcb67fa5f3f6af376527e02880495092
Author: Freja Nordsiek <fnordsie at gmail.com>
Date:   Tue Jan 21 19:51:25 2014 -0500

    Fixed but in complex type encoding where type was not kept constant.
---
 hdf5storage/utilities.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hdf5storage/utilities.py b/hdf5storage/utilities.py
index 4fc73b3..21f0d33 100644
--- a/hdf5storage/utilities.py
+++ b/hdf5storage/utilities.py
@@ -229,7 +229,7 @@ def encode_complex(data, complex_names):
     # if it isn't already one.
     dtype_name = data.dtype.name
     if dtype_name[0:7] == 'complex':
-        dtype_name = 'float' + str(int(dtype_name[7:]))
+        dtype_name = 'float' + str(int(float(dtype_name[7:])/2))
 
     # Create the new version of the data with the right field names for
     # the real and complex parts and the right shape.

-- 
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