Skip to content

Commit

Permalink
Fix case with output_array=None
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Sep 11, 2023
1 parent 6739839 commit dd766a0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions reproject/mosaicking/coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,13 @@ def reproject_and_coadd(
result.to_zarr(zarr_path)
result = da.from_zarr(zarr_path)

da.store(
result,
output_array,
compute=True,
scheduler="synchronous",
)

return output_array, None
if output_array is None:
return result.compute(scheduler="synchronous"), None
else:
da.store(
result,
output_array,
compute=True,
scheduler="synchronous",
)
return output_array, None

0 comments on commit dd766a0

Please sign in to comment.