Skip to content

Commit

Permalink
Fix python3 error
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcgibbo committed Jan 2, 2014
1 parent b1dcae8 commit cc03ef8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MDTraj/lh5.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#
##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2014 Stanford University and the Authors
Expand All @@ -18,7 +18,7 @@
#
# You should have received a copy of the GNU Lesser General Public
# License along with MDTraj. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

""" MSMBuilder2 "LH5" trajectory format.
"""
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit cc03ef8

Please sign in to comment.