Skip to content

Commit

Permalink
Add creation of direcotry, if it doesnt exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Roxana-P committed Sep 28, 2023
1 parent 0cc563b commit b731d4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/export_npz.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from pathlib import Path

import numpy as np

import gustaf
Expand Down Expand Up @@ -54,6 +56,7 @@
hexa.show_options["data_name"] = "arange"

# Export hexa, edges and vertices
Path("export").mkdir(exist_ok=True)
gustaf.io.npz.export(hexa, "export/hexa.npz")
gustaf.io.npz.export(hexa.to_edges(), "export/hexa_edges.npz")
gustaf.io.npz.export(hexa.to_vertices(), "export/hexa_vertices.npz")
Expand Down

0 comments on commit b731d4f

Please sign in to comment.