diff --git a/pydiffvg/save_svg.py b/pydiffvg/save_svg.py index 55ae189..486a4e0 100644 --- a/pydiffvg/save_svg.py +++ b/pydiffvg/save_svg.py @@ -60,7 +60,7 @@ def save_svg(filename, width, height, shapes, shape_groups, use_gamma = False): stop_colors = lg.stop_colors.data.cpu().numpy() for j in range(offsets.shape[0]): stop = etree.SubElement(color, 'stop') - stop.set('offset', offsets[j]) + stop.set('offset', str(offsets[j])) c = lg.stop_colors[j, :] stop.set('stop-color', 'rgb({}, {}, {})'.format(\ int(255 * c[0]), int(255 * c[1]), int(255 * c[2])))