@@ -62,7 +62,7 @@ static pybind11::array_t<double> _get_transform_mesh(const pybind11::object& tra
6262 // If attribute doesn't exist, raises Python AttributeError
6363 auto inverse = transform.attr (" inverted" )();
6464
65- pybind11::ssize_t mesh_dims[2 ] = {dims[0 ]*dims[2 ], 2 };
65+ pybind11::ssize_t mesh_dims[2 ] = {dims[0 ]*dims[1 ], 2 };
6666 pybind11::array_t <double > input_mesh (mesh_dims);
6767 auto p = input_mesh.mutable_data ();
6868
@@ -102,7 +102,7 @@ static void image_resample(pybind11::array input_array,
102102 auto dtype = input_array.dtype (); // Validated when determine resampler below
103103 auto ndim = input_array.ndim ();
104104
105- if (ndim < 2 || ndim > 3 )
105+ if (ndim != 2 && ndim != 3 )
106106 throw std::invalid_argument (" Input array must be a 2D or 3D array" );
107107
108108 if (ndim == 3 && input_array.shape (2 ) != 4 )
@@ -211,7 +211,6 @@ PYBIND11_MODULE(_image, m) {
211211 .value (" SINC" , SINC)
212212 .value (" LANCZOS" , LANCZOS)
213213 .value (" BLACKMAN" , BLACKMAN)
214- .value (" _n_interpolation" , _n_interpolation)
215214 .export_values ();
216215
217216 m.def (" resample" , &image_resample,
0 commit comments