fix: 规范化实验产物行尾
This commit is contained in:
@@ -681,7 +681,16 @@ def evaluate_methods(
|
||||
|
||||
|
||||
def _save_figure(fig, output_dir: Path, name: str) -> None:
|
||||
fig.savefig(output_dir / f"{name}.svg", bbox_inches="tight")
|
||||
svg_path = output_dir / f"{name}.svg"
|
||||
fig.savefig(svg_path, bbox_inches="tight")
|
||||
svg_path.write_text(
|
||||
"\n".join(
|
||||
line.rstrip()
|
||||
for line in svg_path.read_text(encoding="utf-8").splitlines()
|
||||
)
|
||||
+ "\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
fig.savefig(
|
||||
output_dir / f"{name}.png",
|
||||
dpi=300,
|
||||
@@ -892,7 +901,7 @@ def _write_samples(
|
||||
+ ["joint_margin", "solve_ms", "success", "command_limited"]
|
||||
)
|
||||
with path.open("w", encoding="utf-8", newline="") as stream:
|
||||
writer = csv.writer(stream)
|
||||
writer = csv.writer(stream, lineterminator="\n")
|
||||
writer.writerow(fields)
|
||||
for name, result in results.items():
|
||||
for index, timestamp in enumerate(result.times_s):
|
||||
|
||||
Reference in New Issue
Block a user