summaryrefslogtreecommitdiff
path: root/src/python/gudhi/subsampling.pyx
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2020-01-16 12:32:56 +0100
committerGitHub <noreply@github.com>2020-01-16 12:32:56 +0100
commit32a5b2ed4f69cc085dfef66bd44d00fd375d1cc9 (patch)
treec96f825a731b82f7240b2ffc81a57a8dd2bffa92 /src/python/gudhi/subsampling.pyx
parent8c20dd2dc4b3b192badb6d26c27efdaaa32cd9bd (diff)
parentd747facccbe835be1384e569cf3d6e4c335c0364 (diff)
Merge pull request #202 from VincentRouvreau/cython_language_level_not_set
Cython language level not set
Diffstat (limited to 'src/python/gudhi/subsampling.pyx')
-rw-r--r--src/python/gudhi/subsampling.pyx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/python/gudhi/subsampling.pyx b/src/python/gudhi/subsampling.pyx
index b1812087..c501d16b 100644
--- a/src/python/gudhi/subsampling.pyx
+++ b/src/python/gudhi/subsampling.pyx
@@ -52,10 +52,10 @@ def choose_n_farthest_points(points=None, off_file='', nb_points=0, starting_poi
if off_file:
if os.path.isfile(off_file):
if starting_point == '':
- return subsampling_n_farthest_points_from_file(str.encode(off_file),
+ return subsampling_n_farthest_points_from_file(off_file.encode('utf-8'),
nb_points)
else:
- return subsampling_n_farthest_points_from_file(str.encode(off_file),
+ return subsampling_n_farthest_points_from_file(off_file.encode('utf-8'),
nb_points,
starting_point)
else:
@@ -88,7 +88,7 @@ def pick_n_random_points(points=None, off_file='', nb_points=0):
"""
if off_file:
if os.path.isfile(off_file):
- return subsampling_n_random_points_from_file(str.encode(off_file),
+ return subsampling_n_random_points_from_file(off_file.encode('utf-8'),
nb_points)
else:
print("file " + off_file + " not found.")
@@ -118,7 +118,7 @@ def sparsify_point_set(points=None, off_file='', min_squared_dist=0.0):
"""
if off_file:
if os.path.isfile(off_file):
- return subsampling_sparsify_points_from_file(str.encode(off_file),
+ return subsampling_sparsify_points_from_file(off_file.encode('utf-8'),
min_squared_dist)
else:
print("file " + off_file + " not found.")