Open
Description
Problem:
The following command fails in my installation:
vpype read -s scale_test.svg
I get the following error:
Traceback (most recent call last):
570F
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nquinones/miniforge3/envs/vsketch/lib/python3.12/site-packages/vpype/io.py", line 343, in _process_path
line = line.view(dtype=complex).reshape(len(line))
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nquinones/miniforge3/envs/vsketch/lib/python3.12/site-packages/numpy/core/_internal.py", line 551, in _view_is_safe
raise TypeError("Cannot change data-type for object array.")
TypeError: Cannot change data-type for object array.
Solution:
I tried to fix it by modifying the following line:
Line 339 in 3d82012
to:
line = LineString(line).simplify(tolerance=quantization)
line = np.array(line.coords, dtype=float)
and that seems to work.
Additional info:
I'm using the following versions on a MacOS Ventura 13.6
numpy=1.26.4
vpype==1.14.0
shapely==2.0.4
Metadata
Metadata
Assignees
Labels
No labels