File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
bindings/Python/type_caster Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ struct type_caster<plssvm::matrix<T, layout>> {
110110 const T *ptr = static_cast <T *>(buffer.ptr );
111111
112112 // check the memory layout of the Python Numpy array
113- if constexpr (Flags & py::array::c_style) {
113+ if constexpr (static_cast < bool >( Flags & py::array::c_style) ) {
114114 // the provided Python Numpy array has C style layout
115115 if constexpr (layout == plssvm::layout_type::aos) {
116116 // memory layout of Python Numpy array and PLSSVM matrix are the same -> can use memcpy to convert
@@ -130,7 +130,7 @@ struct type_caster<plssvm::matrix<T, layout>> {
130130 // unsupported PLSSVM matrix memory layout
131131 return false ;
132132 }
133- } else if constexpr (Flags & py::array::f_style) {
133+ } else if constexpr (static_cast < bool >( Flags & py::array::f_style) ) {
134134 if constexpr (layout == plssvm::layout_type::aos) {
135135 // the memory layouts don't match -> must use loops to convert layouts
136136#pragma omp parallel for collapse(2)
You can’t perform that action at this time.
0 commit comments