[python-hdf5storage] 38/152: Changed the way that None is written.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:24:32 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 a43da17ddd210b0a044f3c8c8967db9fe50bd812
Author: Freja Nordsiek <fnordsie at gmail.com>
Date:   Sun Jan 26 20:29:59 2014 -0500

    Changed the way that None is written.
---
 README.rst                 | 46 +++++++++++++++++++++++-----------------------
 hdf5storage/Marshallers.py |  3 +--
 2 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/README.rst b/README.rst
index 13059cc..3846a90 100644
--- a/README.rst
+++ b/README.rst
@@ -60,31 +60,31 @@ will be what it is read back as) the MATLAB class it becomes if
 targetting a MAT file, and the first version of this package to
 support writing it so MATlAB can read it.
 
-=============  =======  ================  =======  ========
-Python                                    MATLAB
-----------------------------------------  -----------------
-Type           Version  Converted to      Class    Version
-=============  =======  ================  =======  ========
-bool           0.1      np.bool\_          logical  0.1
-None           0.1      ``np.array([])``  ``[]``   0.1
-int            0.1      np.int64          int64    0.1
-float          0.1      np.float64        double   0.1
-complex        0.1      np.complex128     double   0.1
-str            0.1      np.bytes\_        char     0.1 [1]_
-bytes          0.1      np.bytes\_        char     0.1
-bytearray      0.1      np.bytes\_        char     0.1
-np.bool\_      0.1                        logical  0.1
-np.uint8       0.1                        uint8    0.1
+=============  =======  ==================  =======  ========
+Python                                      MATLAB
+------------------------------------------  -----------------
+Type           Version  Converted to        Class    Version
+=============  =======  ==================  =======  ========
+bool           0.1      np.bool\_           logical  0.1
+None           0.1      ``np.float64([])``  ``[]``   0.1
+int            0.1      np.int64            int64    0.1
+float          0.1      np.float64          double   0.1
+complex        0.1      np.complex128       double   0.1
+str            0.1      np.bytes\_          char     0.1 [1]_
+bytes          0.1      np.bytes\_          char     0.1
+bytearray      0.1      np.bytes\_          char     0.1
+np.bool\_      0.1                          logical  0.1
+np.uint8       0.1                          uint8    0.1
 np.float16     0.1
-np.float32     0.1                        single   0.1
-np.float64     0.1                        double   0.1
+np.float32     0.1                          single   0.1
+np.float64     0.1                          double   0.1
 np.complex32   0.1
-np.complex64   0.1                        single   0.1
-np.complex128  0.1                        double   0.1
-np.str\_       0.1      np.uint32         uint32   0.1 [2]_
-np.bytes\_     0.1                        char     0.1
-dict           0.1                        struct   0.1 [3]_
-=============  =======  ================  =======  ========
+np.complex64   0.1                          single   0.1
+np.complex128  0.1                          double   0.1
+np.str\_       0.1      np.uint32           uint32   0.1 [2]_
+np.bytes\_     0.1                          char     0.1
+dict           0.1                          struct   0.1 [3]_
+=============  =======  ==================  =======  ========
 
 .. [1] Converted to ASCII, so characters outside of that set are lost.
 .. [2] Simply copied over as the uint32 versions of each UTF-32 character.
diff --git a/hdf5storage/Marshallers.py b/hdf5storage/Marshallers.py
index 87ebf77..33974b7 100644
--- a/hdf5storage/Marshallers.py
+++ b/hdf5storage/Marshallers.py
@@ -717,8 +717,7 @@ class PythonNoneMarshaller(NumpyScalarArrayMarshaller):
         # data and the right type_string set (parent can't guess right
         # from the modified form).
         NumpyScalarArrayMarshaller.write(self, f, grp, name,
-                                         np.ndarray(shape=(0, 0),
-                                         dtype='float64'),
+                                         np.float64([]),
                                          self.get_type_string(data,
                                          type_string), options)
 

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