mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2024-11-13 06:10:21 +01:00
For bounds.py (calculation of offsets), use the same data type as rivers
This commit is contained in:
parent
b4f97bec61
commit
7529291ab4
|
@ -6,8 +6,8 @@ def make_bounds(dirs, rivers):
|
|||
"""
|
||||
|
||||
(Y, X) = dirs.shape
|
||||
bounds_h = np.zeros((Y, X-1), dtype='i4')
|
||||
bounds_v = np.zeros((Y-1, X), dtype='i4')
|
||||
bounds_h = np.zeros((Y, X-1), dtype=rivers.dtype)
|
||||
bounds_v = np.zeros((Y-1, X), dtype=rivers.dtype)
|
||||
|
||||
bounds_v += (rivers * (dirs==1))[:-1,:]
|
||||
bounds_h += (rivers * (dirs==2))[:,:-1]
|
||||
|
|
Loading…
Reference in New Issue
Block a user