Skip to content

Commit 5dcd2ee

Browse files
committed
fix Mesh object from generate_2d
1 parent 14da38f commit 5dcd2ee

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pygalmesh/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import tempfile
44

55
import meshio
6+
import numpy
67
from _pygalmesh import (
78
SizingFieldBase,
89
_generate_2d,
@@ -71,7 +72,7 @@ def generate_mesh(
7172

7273
def generate_2d(points, constraints, B=math.sqrt(2), cell_size=0.0, num_lloyd_steps=0):
7374
points, cells = _generate_2d(points, constraints, B, cell_size, num_lloyd_steps)
74-
return meshio.Mesh(points, {"triangle": cells})
75+
return meshio.Mesh(numpy.array(points), {"triangle": numpy.array(cells)})
7576

7677

7778
def generate_periodic_mesh(

0 commit comments

Comments
 (0)