Convert arc points to torch.float
This commit is contained in:
@@ -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])
|
assert(e.end.imag == points[0][1])
|
||||||
else:
|
else:
|
||||||
points.append((e.end.real, e.end.imag))
|
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 = 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 / points[:, 2:3]
|
||||||
points = points[:, :2].contiguous()
|
points = points[:, :2].contiguous()
|
||||||
|
Reference in New Issue
Block a user