File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 1
- from dataclasses import dataclass
2
- from typing import Sequence , Union
1
+ from dataclasses import dataclass , field
2
+ from typing import Sequence , Union , Annotated
3
3
4
4
import numpy as np
5
5
6
- from gempy_engine .core .backend_tensor import BackendTensor
7
- from gempy_engine .core .utils import cast_type_inplace
8
-
9
6
10
7
@dataclass
11
8
class CenteredGrid :
12
9
centers : np .ndarray #: This is just used to calculate xyz to interpolate. Tz is independent
13
- resolution : Sequence [float ]
14
- radius : Union [ float , Sequence [float ]]
10
+ resolution : Sequence [float ] | np . ndarray
11
+ radius : float | Sequence [float ] | np . ndarray
15
12
16
- kernel_grid_centers : np .ndarray = None
17
- left_voxel_edges : np .ndarray = None
18
- right_voxel_edges : np .ndarray = None
13
+ kernel_grid_centers : np .ndarray = field ( init = False )
14
+ left_voxel_edges : np .ndarray = field ( init = False )
15
+ right_voxel_edges : np .ndarray = field ( init = False )
19
16
20
17
def __len__ (self ):
21
18
return self .centers .shape [0 ] * self .kernel_grid_centers .shape [0 ]
You can’t perform that action at this time.
0 commit comments