diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2019-11-09 21:03:13 +0100 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2019-11-09 21:03:13 +0100 |
commit | d091cf5369c2eba0bb301942842d56606a45af76 (patch) | |
tree | 25eeda58d913cf25b096f77ebc26d5335bfa1007 /src/python/gudhi/reader_utils.pyx | |
parent | db405e686cc859e510b894dca45562158cb5c963 (diff) |
Replace 'is' with == or similar.
Related to issue #113, but I did not touch
persistence_graphical_tools.py which is handled in PR #119.
I don't know if I got them all, I guess we'll start seeing the warnings
with python-3.8 soon enough.
Diffstat (limited to 'src/python/gudhi/reader_utils.pyx')
-rw-r--r-- | src/python/gudhi/reader_utils.pyx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/python/gudhi/reader_utils.pyx b/src/python/gudhi/reader_utils.pyx index 147fae71..b266c783 100644 --- a/src/python/gudhi/reader_utils.pyx +++ b/src/python/gudhi/reader_utils.pyx @@ -37,7 +37,7 @@ def read_lower_triangular_matrix_from_csv_file(csv_file='', separator=';'): :returns: The lower triangular matrix. :rtype: vector[vector[double]] """ - if csv_file is not '': + if csv_file: if path.isfile(csv_file): return read_matrix_from_csv_file(str.encode(csv_file), ord(separator[0])) print("file " + csv_file + " not set or not found.") @@ -56,7 +56,7 @@ def read_persistence_intervals_grouped_by_dimension(persistence_file=''): :returns: The persistence pairs grouped by dimension. :rtype: map[int, vector[pair[double, double]]] """ - if persistence_file is not '': + if persistence_file: if path.isfile(persistence_file): return read_pers_intervals_grouped_by_dimension(str.encode(persistence_file)) print("file " + persistence_file + " not set or not found.") @@ -79,7 +79,7 @@ def read_persistence_intervals_in_dimension(persistence_file='', only_this_dim=- :returns: The persistence intervals. :rtype: numpy array of dimension 2 """ - if persistence_file is not '': + if persistence_file: if path.isfile(persistence_file): return np_array(read_pers_intervals_in_dimension(str.encode( persistence_file), only_this_dim)) |