Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 23, 2024
1 parent 86c4efd commit 6e6f192
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions gustaf/io/npz.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def load(fname, **kwargs):
.. code-block:: python
tet = gustaf.io.npz.load('export/tet.npz')
tet = gustaf.io.npz.load("export/tet.npz")
tet.show()
Returns
Expand All @@ -38,7 +38,7 @@ def load(fname, **kwargs):
if whatami == "vertices":
gus_object = Vertices(vertices=loaded["vertices"])
# Meshes
elif whatami in gus_object_types.keys():
elif whatami in gus_object_types:
gus_object = gus_object_types[whatami](
vertices=loaded["vertices"], elements=loaded["elements"]
)
Expand Down Expand Up @@ -96,13 +96,15 @@ def export(gus_object, fname):
)
# Create hexa elements and set vertex data
hexa.vertex_data['arange'] = np.arange(len(vertices))
hexa.vertex_data['quad_x'] = [v[0]**2 for v in vertices]
hexa.BC = {'min_z' : np.array([0, 1, 2, 3]),
'max_z' : np.array([4, 5, 6, 7])}
hexa.vertex_data["arange"] = np.arange(len(vertices))
hexa.vertex_data["quad_x"] = [v[0] ** 2 for v in vertices]
hexa.BC = {
"min_z": np.array([0, 1, 2, 3]),
"max_z": np.array([4, 5, 6, 7]),
}
# Export hexa
gustaf.io.npz.export(hexa, 'export/hexa.npz')
gustaf.io.npz.export(hexa, "export/hexa.npz")
Parameters
-----------
Expand Down

0 comments on commit 6e6f192

Please sign in to comment.