FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Correctly initialize kwargs to _image.resample. · matplotlib/matplotlib@89be34e · GitHub

Repository navigation

Commit 89be34e

Browse files
committed
Correctly initialize kwargs to _image.resample.
The Python side seems to always pass the optional arguments, but technically, these should be initialized before calling `PyArg_ParseTupleAndKeywords` in case they aren't.
1 parent 26fd914 commit 89be34e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/_image_wrapper.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,12 @@ image_resample(PyObject *self, PyObject* args, PyObject *kwargs)
120120
PyArrayObject *output_array = NULL;
121121
PyArrayObject *transform_mesh_array = NULL;
122122

123+
params.interpolation = NEAREST;
123124
params.transform_mesh = NULL;
125+
params.resample = false;
126+
params.norm = false;
127+
params.radius = 1.0;
128+
params.alpha = 1.0;
124129

125130
const char *kwlist[] = {
126131
"input_array", "output_array", "transform", "interpolation",

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL