diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-01-18 20:28:51 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-01-18 20:28:51 +0100 |
commit | 0ab5f895846f1d773157181b6aa47c2d96488841 (patch) | |
tree | 2e126a000f87bf0a5fce820921bf048ad5b3a8da /src/python/gudhi/off_reader.pyx | |
parent | 051c9760a214a11e8e4af14ae6221e34bb876350 (diff) | |
parent | f8a5efa165241b9e27f06431e4919322b359ddb2 (diff) |
Merge remote-tracking branch 'origin/master' into doc
Diffstat (limited to 'src/python/gudhi/off_reader.pyx')
-rw-r--r-- | src/python/gudhi/off_reader.pyx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/python/gudhi/off_reader.pyx b/src/python/gudhi/off_reader.pyx index 3a31eba6..7e6d9d80 100644 --- a/src/python/gudhi/off_reader.pyx +++ b/src/python/gudhi/off_reader.pyx @@ -1,8 +1,3 @@ -from cython cimport numeric -from libcpp.vector cimport vector -from libcpp.string cimport string -import os - # 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 @@ -12,6 +7,11 @@ import os # Modification(s): # - YYYY/MM Author: Description of the modification +from cython cimport numeric +from libcpp.vector cimport vector +from libcpp.string cimport string +import os + __author__ = "Vincent Rouvreau" __copyright__ = "Copyright (C) 2016 Inria" __license__ = "MIT" @@ -19,7 +19,7 @@ __license__ = "MIT" cdef extern from "Off_reader_interface.h" namespace "Gudhi": vector[vector[double]] read_points_from_OFF_file(string off_file) -def read_off(off_file=''): +def read_points_from_off_file(off_file=''): """Read points from OFF file. :param off_file: An OFF file style name. @@ -30,7 +30,7 @@ def read_off(off_file=''): """ if off_file: if os.path.isfile(off_file): - return read_points_from_OFF_file(str.encode(off_file)) + return read_points_from_OFF_file(off_file.encode('utf-8')) else: print("file " + off_file + " not found.") return [] |