@@ -78,8 +78,8 @@ _get_transform_mesh(const py::object& transform, const py::ssize_t *dims)
7878
7979 if (output_mesh_array.ndim () != 2 ) {
8080 throw std::runtime_error (
81- " Inverse transformed mesh array should be 2D not " +
82- std::to_string ( output_mesh_array.ndim ()) + " D " );
81+ " Inverse transformed mesh array should be 2D not {}D " _s. format (
82+ output_mesh_array.ndim ()));
8383 }
8484
8585 return output_mesh_array;
@@ -108,8 +108,8 @@ image_resample(py::array input_array,
108108
109109 if (ndim == 3 && input_array.shape (2 ) != 4 ) {
110110 throw std::invalid_argument (
111- " 3D input array must be RGBA with shape (M, N, 4), has trailing dimension of " +
112- std::to_string ( input_array.shape (2 )));
111+ " 3D input array must be RGBA with shape (M, N, 4), has trailing dimension of {} " _s. format (
112+ input_array.shape (2 )));
113113 }
114114
115115 // Ensure input array is contiguous, regardless of dtype
@@ -120,14 +120,14 @@ image_resample(py::array input_array,
120120
121121 if (out_ndim != ndim) {
122122 throw std::invalid_argument (
123- " Input (" + std::to_string (ndim) + " D) and output (" + std::to_string (out_ndim) +
124- " D) arrays have different dimensionalities " );
123+ " Input ({} D) and output ({}D) arrays have different dimensionalities " _s. format (
124+ ndim, out_ndim) );
125125 }
126126
127127 if (out_ndim == 3 && output_array.shape (2 ) != 4 ) {
128128 throw std::invalid_argument (
129- " 3D output array must be RGBA with shape (M, N, 4), has trailing dimension of " +
130- std::to_string ( output_array.shape (2 )));
129+ " 3D output array must be RGBA with shape (M, N, 4), has trailing dimension of {} " _s. format (
130+ output_array.shape (2 )));
131131 }
132132
133133 if (!output_array.dtype ().is (dtype)) {
0 commit comments