Skip to content

Commit

Permalink
fix black code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dkuegler committed Jan 9, 2024
1 parent 31c34a0 commit dccd831
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions lapy/_tria_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ def read_vtk(filename):
if not line.startswith("DATASET POLYDATA") and not line.startswith(
"DATASET UNSTRUCTURED_GRID"
):
msg = (f"[read: {line} expected DATASET POLYDATA or DATASET UNSTRUCTURED_GRID] "
f"--> FAILED\n")
msg = (
f"[read: {line} expected DATASET POLYDATA or DATASET UNSTRUCTURED_GRID] "
f"--> FAILED\n"
)
print(msg)
raise IOError(msg)
# read number of points
Expand Down Expand Up @@ -488,13 +490,7 @@ def write_vtk(tria, filename):
for i in range(np.shape(tria.v)[0]):
f.write(" ".join(map(str, tria.v[i, :])))
f.write("\n")
f.write(
"POLYGONS "
+ str(np.shape(tria.t)[0])
+ " "
+ str(4 * np.shape(tria.t)[0])
+ "\n"
)
f.write(f"POLYGONS {np.shape(tria.t)[0]} {4 * np.shape(tria.t)[0]}\n")
for i in range(np.shape(tria.t)[0]):
f.write(" ".join(map(str, np.append(3, tria.t[i, :]))))
f.write("\n")
Expand Down

0 comments on commit dccd831

Please sign in to comment.