diff --git a/src/meshio/dolfin/_dolfin.py b/src/meshio/dolfin/_dolfin.py index e43dbd54..39c2238b 100644 --- a/src/meshio/dolfin/_dolfin.py +++ b/src/meshio/dolfin/_dolfin.py @@ -207,7 +207,7 @@ def _write_cell_data(filename, dim, cell_data): ) for k, value in enumerate(cell_data): - ET.SubElement(mesh_function, "entity", index=str(k), value=repr(value)) + ET.SubElement(mesh_function, "entity", index=str(k), value=repr(value.item())) tree = ET.ElementTree(dolfin) tree.write(filename)