Merge pull request #55 from orenkatzir/master

Convert arc points to torch.float
This commit is contained in:
Tzu-Mao Li
2023-01-09 12:16:17 -05:00
committed by GitHub

View File

@@ -164,7 +164,7 @@ def from_svg_path(path_str, shape_to_canvas = torch.eye(3), force_close = False)
assert(e.end.imag == points[0][1])
else:
points.append((e.end.real, e.end.imag))
points = torch.tensor(points)
points = torch.tensor(points, dtype=torch.float)
points = torch.cat((points, torch.ones([points.shape[0], 1])), dim = 1) @ torch.transpose(shape_to_canvas, 0, 1)
points = points / points[:, 2:3]
points = points[:, :2].contiguous()