summaryrefslogtreecommitdiff
path: root/src/python/gudhi/nerve_gic.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/gudhi/nerve_gic.pyx')
-rw-r--r--src/python/gudhi/nerve_gic.pyx31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/python/gudhi/nerve_gic.pyx b/src/python/gudhi/nerve_gic.pyx
index 2b230b8c..382e71c5 100644
--- a/src/python/gudhi/nerve_gic.pyx
+++ b/src/python/gudhi/nerve_gic.pyx
@@ -1,3 +1,12 @@
+# This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
+# See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
+# Author(s): Vincent Rouvreau
+#
+# Copyright (C) 2018 Inria
+#
+# Modification(s):
+# - YYYY/MM Author: Description of the modification
+
from cython cimport numeric
from libcpp.vector cimport vector
from libcpp.utility cimport pair
@@ -9,16 +18,6 @@ from libc.stdint cimport intptr_t
from gudhi.simplex_tree cimport *
from gudhi.simplex_tree import SimplexTree
-""" This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
- See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
- Author(s): Vincent Rouvreau
-
- Copyright (C) 2018 Inria
-
- Modification(s):
- - YYYY/MM Author: Description of the modification
-"""
-
__author__ = "Vincent Rouvreau"
__copyright__ = "Copyright (C) 2018 Inria"
__license__ = "GPL v3"
@@ -181,7 +180,7 @@ cdef class CoverComplex:
:returns: Read file status.
"""
if os.path.isfile(off_file):
- return self.thisptr.read_point_cloud(str.encode(off_file))
+ return self.thisptr.read_point_cloud(off_file.encode('utf-8'))
else:
print("file " + off_file + " not found.")
return False
@@ -213,7 +212,7 @@ cdef class CoverComplex:
:type color_file_name: string
"""
if os.path.isfile(color_file_name):
- self.thisptr.set_color_from_file(str.encode(color_file_name))
+ self.thisptr.set_color_from_file(color_file_name.encode('utf-8'))
else:
print("file " + color_file_name + " not found.")
@@ -234,7 +233,7 @@ cdef class CoverComplex:
:type cover_file_name: string
"""
if os.path.isfile(cover_file_name):
- self.thisptr.set_cover_from_file(str.encode(cover_file_name))
+ self.thisptr.set_cover_from_file(cover_file_name.encode('utf-8'))
else:
print("file " + cover_file_name + " not found.")
@@ -267,7 +266,7 @@ cdef class CoverComplex:
:type func_file_name: string
"""
if os.path.isfile(func_file_name):
- self.thisptr.set_function_from_file(str.encode(func_file_name))
+ self.thisptr.set_function_from_file(func_file_name.encode('utf-8'))
else:
print("file " + func_file_name + " not found.")
@@ -308,7 +307,7 @@ cdef class CoverComplex:
:type graph_file_name: string
"""
if os.path.isfile(graph_file_name):
- self.thisptr.set_graph_from_file(str.encode(graph_file_name))
+ self.thisptr.set_graph_from_file(graph_file_name.encode('utf-8'))
else:
print("file " + graph_file_name + " not found.")
@@ -369,7 +368,7 @@ cdef class CoverComplex:
:param type: either "GIC" or "Nerve".
:type type: string
"""
- self.thisptr.set_type(str.encode(type))
+ self.thisptr.set_type(type.encode('utf-8'))
def set_verbose(self, verbose):
"""Specifies whether the program should display information or not.