From cc03ef8979daa783ffd6958b3f5ece1ffda68149 Mon Sep 17 00:00:00 2001 From: Robert McGibbon Date: Wed, 1 Jan 2014 22:28:36 -0800 Subject: [PATCH] Fix python3 error --- MDTraj/lh5.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MDTraj/lh5.py b/MDTraj/lh5.py index 0477dc264..c3ad45f04 100644 --- a/MDTraj/lh5.py +++ b/MDTraj/lh5.py @@ -1,4 +1,4 @@ -# +############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2014 Stanford University and the Authors @@ -18,7 +18,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with MDTraj. If not, see . -# +############################################################################## """ MSMBuilder2 "LH5" trajectory format. """ @@ -167,7 +167,8 @@ def topology(self): topology : mdtraj.Topology A topology object """ - if np.all(self._handle.root.AtomID[:] == 0) and np.all(self._handle.root.AtomNames[:] == ''): + if np.all(self._handle.root.AtomID[:] == 0) and (np.all(self._handle.root.AtomNames[:] == b'') + or np.all(self._handle.root.AtomNames[:] == u'')): return None return _topology_from_arrays(