We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0613e3a commit e8e5e9bCopy full SHA for e8e5e9b
1 file changed
simpeg_drivers/driver.py
@@ -286,7 +286,7 @@ def split_list(self, tiles: list[np.ndarray]) -> list[list[np.ndarray]]:
286
"""
287
Number of splits for the data misfit to be distributed evenly among workers.
288
289
- if len(self.workers) == 0:
+ if not self.workers:
290
return [[tile] for tile in tiles]
291
292
n_tiles = len(tiles)
@@ -815,7 +815,7 @@ def get_tiles(self) -> dict[str, list[np.ndarray]]:
815
# Heuristic to avoid too many chunks
816
n_chunks = n_data // self.params.compute.max_chunk_size
817
818
- if len(self.workers) > 0:
+ if self.workers:
819
n_chunks /= len(self.workers)
820
n_chunks = int(n_chunks) * len(self.workers)
821
0 commit comments