Skip to content

Commit ed18b1f

Browse files
committed
[CLN] Refactor grid selection logic by using active state checks
Updated the grid selection logic to use `dense_grid_exists_and_active` and `octree_grid_exists_and_active` checks instead of direct `None` comparisons for consistency and readability.
1 parent 4a76201 commit ed18b1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gempy/core/data/grid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ def regular_grid(self):
275275

276276
if dense_grid_exists_and_active and octree_grid_exists_and_active:
277277
raise AttributeError('Both dense_grid and octree_grid are active. This is not possible.')
278-
elif self.dense_grid is not None:
278+
elif dense_grid_exists_and_active:
279279
return self.dense_grid
280-
elif self.octree_grid is not None:
280+
elif octree_grid_exists_and_active:
281281
return self.octree_grid
282282
else:
283283
return None

0 commit comments

Comments
 (0)