diff --git a/nutils/mesh.py b/nutils/mesh.py index 11e86eaf5..64e8cbe54 100644 --- a/nutils/mesh.py +++ b/nutils/mesh.py @@ -357,7 +357,7 @@ def parsegmsh(mshdata): if keep.all(): renum = numpy.arange(len(cells.data)) else: - msh.cells[icell] = cells._replace(data=cells.data[numpy.hstack([True, keep])]) + msh.cells[icell] = type(cells)(type=cells.type, data=cells.data[numpy.hstack([True, keep])]) renum = numpy.hstack([0, keep.cumsum()]) renums.append(renum) for name, (itag, nd) in msh.field_data.items():