Skip to content

Commit

Permalink
shallow water: fixed integer division
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed May 16, 2018
1 parent bf0e09a commit 9cae4fd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ def model(height, width, dtype=np.float32):

m = np.ones((height, width), dtype=dtype)
D = droplet(8, 8) # simulate a water drop
droploc = height / 4
droploc = height // 4
(dropx, dropy) = D.shape
m[droploc:droploc + dropx, droploc:droploc + dropy] += D
droploc = height / 2
droploc = height // 2
(dropx, dropy) = D.shape
m[droploc:droploc + dropx, droploc:droploc + dropy] += D

Expand Down

0 comments on commit 9cae4fd

Please sign in to comment.