Skip to content

Commit

Permalink
Initially fill allocated data arrays with 0s
Browse files Browse the repository at this point in the history
  • Loading branch information
mcara committed Oct 23, 2024
1 parent 9fece19 commit a003f84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions drizzle/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ def _alloc_output_arrays(self, out_shape, max_ctx_id, out_img, out_wht,
)

if out_img is None:
self._out_img = np.empty(out_shape, dtype=np.float32)
self._out_img.fill(self._fillval)
self._out_img = np.zeros(out_shape, dtype=np.float32)
else:
self._out_img = out_img

Expand Down
2 changes: 1 addition & 1 deletion src/cdrizzleapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ tdriz(PyObject *obj UNUSED_PARAM, PyObject *args, PyObject *keywords)
}
};

/* Convert t`he fill value string */
/* Convert the fill value string */

if (fillstr == NULL ||
*fillstr == 0 ||
Expand Down

0 comments on commit a003f84

Please sign in to comment.