File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ class GridTypes(enum.Flag):
27
27
28
28
# ? What should we do with the extent?
29
29
30
- values : Annotated [np .ndarray , Field (exclude = True )] = np .empty ((0 , 3 ))
31
- length : Annotated [np .ndarray , Field (exclude = True )] = np .empty (0 )
30
+ values : Annotated [np .ndarray , Field (exclude = True )] = dataclasses . field ( default_factory = lambda : np .empty ((0 , 3 ) ))
31
+ length : Annotated [np .ndarray , Field (exclude = True )] = dataclasses . field ( default_factory = lambda : np .empty (0 ) )
32
32
33
33
_octree_grid : Optional [RegularGrid ] = None
34
34
_dense_grid : Optional [RegularGrid ] = None
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ class Topography:
27
27
source : Optional [str ] = None
28
28
29
29
# Fields managed internally
30
- values : short_array_type = field (init = False , default = np .zeros ((0 , 3 )))
30
+ values : short_array_type = field (init = False , default_factory = lambda : np .zeros ((0 , 3 )))
31
31
resolution : Tuple [int , int ] = Field (init = True , default = (0 , 0 ))
32
- raster_shape : Tuple [int , ...] = field (init = False , default = () )
32
+ raster_shape : Tuple [int , ...] = field (init = False , default_factory = tuple )
33
33
_mask_topo : Optional [np .ndarray ] = field (init = False , default = None , repr = False )
34
34
_x : Optional [np .ndarray ] = field (init = False , default = None , repr = False )
35
35
_y : Optional [np .ndarray ] = field (init = False , default = None , repr = False )
You can’t perform that action at this time.
0 commit comments