@@ -78,8 +78,8 @@ _get_transform_mesh(const py::object& transform, const py::ssize_t *dims)
78
78
79
79
if (output_mesh_array.ndim () != 2 ) {
80
80
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 ()));
83
83
}
84
84
85
85
return output_mesh_array;
@@ -108,8 +108,8 @@ image_resample(py::array input_array,
108
108
109
109
if (ndim == 3 && input_array.shape (2 ) != 4 ) {
110
110
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 )));
113
113
}
114
114
115
115
// Ensure input array is contiguous, regardless of dtype
@@ -120,14 +120,14 @@ image_resample(py::array input_array,
120
120
121
121
if (out_ndim != ndim) {
122
122
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) );
125
125
}
126
126
127
127
if (out_ndim == 3 && output_array.shape (2 ) != 4 ) {
128
128
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 )));
131
131
}
132
132
133
133
if (!output_array.dtype ().is (dtype)) {
0 commit comments