summaryrefslogtreecommitdiff
path: root/python/src/hypergraph.pxi
diff options
context:
space:
mode:
Diffstat (limited to 'python/src/hypergraph.pxi')
-rw-r--r--python/src/hypergraph.pxi4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/src/hypergraph.pxi b/python/src/hypergraph.pxi
index f0312a12..1edff3cb 100644
--- a/python/src/hypergraph.pxi
+++ b/python/src/hypergraph.pxi
@@ -111,7 +111,7 @@ cdef class Hypergraph:
del preserve_mask
def lattice(self): # TODO direct hg -> lattice conversion in cdec
- cdef str plf = hypergraph.AsPLF(self.hg[0], True).c_str()
+ cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str()
return Lattice(eval(plf))
def reweight(self, weights):
@@ -231,7 +231,7 @@ cdef class HypergraphNode:
property cat:
def __get__(self):
if self.node.cat_:
- return TDConvert(-self.node.cat_)
+ return str(TDConvert(-self.node.cat_).c_str())
def __richcmp__(HypergraphNode x, HypergraphNode y, int op):
if op == 2: # ==