Skip to content

Commit 6370304

Browse files
committed
use numpy array to create outlet array rather than list comprehension
1 parent 05c5d3b commit 6370304

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyflwdir/upscale.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ def upscale_check(subidxs_out, idxs_ds, subidxs_ds, minlen=0, mv=_mv):
13681368
# array with outlets (>=0) and streams (-1); nodata value is -9
13691369
assert subidxs_out.size <= 2147483648
13701370
streams = np.full(subidxs_ds.size, -9, dtype=np.int32)
1371-
valid = np.array([bool(1) for _ in range(idxs_ds.size)])
1371+
valid = np.ones(idxs_ds.size, dtype=np.bool_)
13721372
for idx in range(subidxs_out.size):
13731373
subidx = subidxs_out[idx]
13741374
if subidx == mv:

0 commit comments

Comments
 (0)