Skip to content

Commit 5e5035f

Browse files
committed
fix: adding structure grid data class
1 parent a22d51c commit 5e5035f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from dataclasses import dataclass
2+
import numpy as np
3+
4+
5+
@dataclass
6+
class StructuredGrid:
7+
origin: np.ndarray
8+
maximum: np.ndarray
9+
step_vector: np.ndarray
10+
nsteps: np.ndarray
11+
data: np.ndarray
12+
13+
def to_dict(self):
14+
return {
15+
"origin": self.origin,
16+
"maximum": self.maximum,
17+
"step_vector": self.step_vector,
18+
"nsteps": self.nsteps,
19+
"data": self.data,
20+
}
21+
22+
def vtk(self):
23+
pass

0 commit comments

Comments
 (0)