diff options
author | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-08-11 23:30:00 -0400 |
---|---|---|
committer | Victor Chahuneau <vchahune@cs.cmu.edu> | 2012-08-11 23:30:00 -0400 |
commit | 7527592aaf4245749845500aca6a7fcc97eb2f17 (patch) | |
tree | d8fdb627c657e7a4699baf0670ca749df1f7e972 /python/src/hypergraph.pxi | |
parent | dad8da6f5f65e157476b3999257069bda7b8552e (diff) |
[python] fix for new dict API
- TDConvert returns a string
- various c_str fixes (make copies)
- cleanup .gitignore
Diffstat (limited to 'python/src/hypergraph.pxi')
-rw-r--r-- | python/src/hypergraph.pxi | 4 |
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: # == |