@@ -73,7 +73,7 @@ _get_transform_mesh(const py::object& transform, const py::ssize_t *dims)
7373 for (auto y = 0 ; y < dims[0 ]; ++y) {
7474 for (auto x = 0 ; x < dims[1 ]; ++x) {
7575 // The convention for the supplied transform is that pixel centers
76- // are at 0.5, 1.5, 2.5, etc.
76+ // are at 0.5, 1.5, 2.5, etc.
7777 *p++ = (double )x + 0.5 ;
7878 *p++ = (double )y + 0.5 ;
7979 }
@@ -87,16 +87,16 @@ _get_transform_mesh(const py::object& transform, const py::ssize_t *dims)
8787 if (output_mesh_array.ndim () != 2 ) {
8888 throw std::runtime_error (mpl::format (
8989 " Inverse transformed mesh array should be 2D not {}D" ,
90- output_mesh_array.ndim ()));
90+ output_mesh_array.ndim ()));
9191 }
9292
9393 // An undersized mesh would be read out of bounds by the resampler.
9494 if (output_mesh_array.shape (0 ) != mesh_dims[0 ] ||
9595 output_mesh_array.shape (1 ) != mesh_dims[1 ]) {
9696 throw std::runtime_error (mpl::format (
9797 " Inverse transformed mesh array should have shape ({}, {}) not ({}, {})" ,
98- mesh_dims[0 ], mesh_dims[1 ],
99- output_mesh_array.shape (0 ), output_mesh_array.shape (1 )));
98+ mesh_dims[0 ], mesh_dims[1 ],
99+ output_mesh_array.shape (0 ), output_mesh_array.shape (1 )));
100100 }
101101
102102 return output_mesh_array;
@@ -126,7 +126,7 @@ image_resample(py::array input_array,
126126 if (ndim == 3 && input_array.shape (2 ) != 4 ) {
127127 throw std::invalid_argument (mpl::format (
128128 " 3D input array must be RGBA with shape (M, N, 4), has trailing dimension of {}" ,
129- input_array.shape (2 )));
129+ input_array.shape (2 )));
130130 }
131131
132132 // Ensure input array is contiguous, regardless of dtype
@@ -141,13 +141,13 @@ image_resample(py::array input_array,
141141 if (out_ndim != ndim) {
142142 throw std::invalid_argument (mpl::format (
143143 " Input ({}D) and output ({}D) arrays have different dimensionalities" ,
144- ndim, out_ndim));
144+ ndim, out_ndim));
145145 }
146146
147147 if (out_ndim == 3 && output_array.shape (2 ) != 4 ) {
148148 throw std::invalid_argument (mpl::format (
149149 " 3D output array must be RGBA with shape (M, N, 4), has trailing dimension of {}" ,
150- output_array.shape (2 )));
150+ output_array.shape (2 )));
151151 }
152152
153153 if (!output_array.dtype ().is (dtype)) {
@@ -225,7 +225,7 @@ raise_image_comparison_failure(std::string msg)
225225{
226226 auto exceptions = py::module_::import (" matplotlib.testing.exceptions" );
227227 auto ImageComparisonFailure = exceptions.attr (" ImageComparisonFailure" );
228- py::set_error (ImageComparisonFailure. ptr () , msg.c_str ());
228+ py::set_error (ImageComparisonFailure, msg.c_str ());
229229 throw py::error_already_set ();
230230}
231231
@@ -241,7 +241,7 @@ calculate_rms_and_diff(py::array_t<unsigned char> expected_image,
241241 if (image.ndim () != 3 ) {
242242 raise_image_comparison_failure (mpl::format (
243243 " {} image must be 3-dimensional, but is {}-dimensional" ,
244- name, image.ndim ()));
244+ name, image.ndim ()));
245245 }
246246 }
247247
@@ -259,7 +259,7 @@ calculate_rms_and_diff(py::array_t<unsigned char> expected_image,
259259 raise_image_comparison_failure (mpl::format (
260260 " Image sizes do not match expected size: {expected_image.shape} "
261261 " actual size {actual_image.shape}" ,
262- " expected_image" _a=expected_image, " actual_image" _a=actual_image));
262+ " expected_image" _a=expected_image, " actual_image" _a=actual_image));
263263 }
264264 auto expected = expected_image.unchecked <3 >();
265265 auto actual = actual_image.unchecked <3 >();
0 commit comments