-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Labels
In wait of NanobindTo be done after #1196To be done after #1196
Description
The method read_lower_triangular_matrix_from_csv_file
in reader_utils.h
does not throw anything when the given file is not found and just returns an empty vector.
std::vector<std::vector<Filtration_value>> result;
std::ifstream in;
in.open(filename.c_str());
if (!in.is_open()) {
return result;
}
The behavior of the C++ functions doesn't look very good then, the calling function won't notice if there is an error (unless it somehow redirects cerr and monitors it). If it threw an exception, then the python wrapper would have nothing to do.
Originally posted by @mglisse in #1196 (comment)
(After Nanobind PR) As reader_utils.py
is only there to verify the existence of the input file, it could be completely removed if the C++ method throws an appropriate error (std::invalid_argument
+ message giving the file name looks sufficient?).
Metadata
Metadata
Assignees
Labels
In wait of NanobindTo be done after #1196To be done after #1196