mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2025-07-14 14:30:25 +02:00
For bounds.py (calculation of offsets), use the same data type as rivers
This commit is contained in:
@ -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]
|
||||
|
Reference in New Issue
Block a user