Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[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.
  • Loading branch information
Leguark committed Sep 30, 2025
commit ed18b1ffac14536d60ad99106eb99baa50fbba02
4 changes: 2 additions & 2 deletions gempy/core/data/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ def regular_grid(self):

if dense_grid_exists_and_active and octree_grid_exists_and_active:
raise AttributeError('Both dense_grid and octree_grid are active. This is not possible.')
elif self.dense_grid is not None:
elif dense_grid_exists_and_active:
return self.dense_grid
elif self.octree_grid is not None:
elif octree_grid_exists_and_active:
return self.octree_grid
else:
return None
Expand Down