Skip to content

Commit 83fc99f

Browse files
committed
Avoiding overflow in Simulation.num_cells
1 parent ae4e2e3 commit 83fc99f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tidy3d/components/simulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4821,7 +4821,7 @@ def num_cells(self) -> int:
48214821
Number of yee cells in the simulation.
48224822
"""
48234823

4824-
return np.prod(self.grid.num_cells, dtype=np.int64)
4824+
return int(np.prod([float(nc) for nc in self.grid.num_cells]))
48254825

48264826
@property
48274827
def _num_computational_grid_points_dim(self):

0 commit comments

Comments
 (0)