Skip to content

Commit 05c5d3b

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

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
@@ -1335,7 +1335,7 @@ def upscale_error(subidxs_out, idxs_ds, subidxs_ds, mv=_mv):
13351335
assert subidxs_out.size == idxs_ds.size
13361336
# binary array with outlets
13371337
subn = subidxs_ds.size
1338-
outlets = np.array([bool(0) for _ in range(subn)])
1338+
outlets = np.zeros(shape=subn, dtype=np.bool_)
13391339
for subidx in subidxs_out:
13401340
if subidx == mv:
13411341
continue

0 commit comments

Comments
 (0)