Skip to content

Commit

Permalink
Merge pull request #2629 from gdsfactory/fix-polygon-serialization
Browse files Browse the repository at this point in the history
clean polygon vertices after converting to numpy array
  • Loading branch information
joamatab committed Mar 18, 2024
2 parents cfb23ce + 2e28b0d commit 0c5e787
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gdsfactory/serialization.py
Expand Up @@ -114,7 +114,9 @@ def clean_value_json(
return [clean_value_json(i) for i in value]

elif isinstance(value, gdstk.Polygon):
return np.round(value.points, DEFAULT_SERIALIZATION_MAX_DIGITS)
return clean_value_json(
np.round(value.points, DEFAULT_SERIALIZATION_MAX_DIGITS)
)

else:
try:
Expand Down

0 comments on commit 0c5e787

Please sign in to comment.