Skip to content

Commit

Permalink
shallow water: initialize coord arrays with int64
Browse files Browse the repository at this point in the history
  • Loading branch information
tkarna committed Dec 16, 2024
1 parent a609ea4 commit ed1ee9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/shallow_water.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ def ind_arr(shape, columns=False):
"""Construct an (nx, ny) array where each row/col is an arange"""
nx, ny = shape
if columns:
ind = np.arange(0, nx * ny, 1, dtype=np.int32) % nx
ind = np.arange(0, nx * ny, 1, dtype=np.int64) % nx
ind = transpose(np.reshape(ind, (ny, nx)))
else:
ind = np.arange(0, nx * ny, 1, dtype=np.int32) % ny
ind = np.arange(0, nx * ny, 1, dtype=np.int64) % ny
ind = np.reshape(ind, (nx, ny))
return ind.astype(dtype)

Expand Down

0 comments on commit ed1ee9c

Please sign in to comment.