Skip to content

Commit 7cf3d6e

Browse files
committed
Fix case with output_array=None
1 parent dc30111 commit 7cf3d6e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

reproject/mosaicking/coadd.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -468,11 +468,13 @@ def reproject_and_coadd(
468468
result.to_zarr(zarr_path)
469469
result = da.from_zarr(zarr_path)
470470

471-
da.store(
472-
result,
473-
output_array,
474-
compute=True,
475-
scheduler="synchronous",
476-
)
477-
478-
return output_array, None
471+
if output_array is None:
472+
return result.compute(scheduler="synchronous"), None
473+
else:
474+
da.store(
475+
result,
476+
output_array,
477+
compute=True,
478+
scheduler="synchronous",
479+
)
480+
return output_array, None

0 commit comments

Comments
 (0)