Skip to content

Commit 683e4ed

Browse files
committed
Fix clang warning.
1 parent 5d3904d commit 683e4ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygmo/common_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ inline Vector ndarr_to_vector(const py::array_t<T, ExtraFlags> &a)
140140
template <typename Array, typename T, typename Allocator>
141141
inline Array vector_to_ndarr(const std::vector<T, Allocator> &v)
142142
{
143-
return Array(v.size(), v.data());
143+
return Array(boost::numeric_cast<py::ssize_t>(v.size()), v.data());
144144
}
145145

146146
// Convert a numpy array into a sparsity pattern.

0 commit comments

Comments
 (0)