Skip to content

Commit

Permalink
Merge pull request #31 from pkgw/fix-cascade
Browse files Browse the repository at this point in the history
toasty/merge.py: oops, clear our downsampling buffer on init
  • Loading branch information
pkgw committed Nov 18, 2020
2 parents 01da964 + 4bb4fbb commit d013676
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions toasty/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def _cascade_images_serial(pio, mode, start, merger, cli_progress):
if subimg is not None:
if buf is None:
buf = mode.make_maskable_buffer(512, 512)
buf.clear()

buf.asarray()[slidx] = subimg.asarray()

Expand Down Expand Up @@ -287,6 +288,7 @@ def _mp_cascade_worker(done_queue, ready_queue, pio, merger, mode):
if subimg is not None:
if buf is None:
buf = mode.make_maskable_buffer(512, 512)
buf.clear()

buf.asarray()[slidx] = subimg.asarray()

Expand Down

0 comments on commit d013676

Please sign in to comment.