diff --git a/volia/core/data.py b/volia/core/data.py index 300b266..d22e8bc 100644 --- a/volia/core/data.py +++ b/volia/core/data.py @@ -104,4 +104,7 @@ def write_line(id_, values=[], out=sys.stdout): values (list, optional): list of values to write, features or labels. Defaults to []. out (_io.TextIOWrapper, optional): . Defaults to sys.stdout. """ - out.write(str(id_) + " ".join(values) + "\n") \ No newline at end of file + if len(values) == 0: + out.write(str(id_) + "\n") + else: + out.write(str(id_) + " " + " ".join(values) + "\n") \ No newline at end of file