Skip to content
Snippets Groups Projects
Commit 8ae2d656 authored by Robert K's avatar Robert K
Browse files

Merge branch 'cleanup/remove-warning-python' into 'master'

[cleanup] Remove signed integer comparison warning.

See merge request !497
parents 401f9582 8d117323
Branches
Tags
1 merge request!497[cleanup] Remove signed integer comparison warning.
Pipeline #54623 failed
......@@ -57,12 +57,13 @@ namespace Dune
inline static void copy ( pybind11::buffer buffer, BlockVector &v )
{
typedef typename BlockVector::field_type field_type;
typedef typename BlockVector::size_type size_type;
pybind11::buffer_info info = buffer.request();
if( info.format != pybind11::format_descriptor< field_type >::format() )
throw pybind11::value_error( "Incompatible buffer format." );
if( info.ndim != blockLevel<BlockVector>() )
if( size_type(info.ndim) != blockLevel<BlockVector>() )
throw pybind11::value_error( "Block vectors can only be initialized from one-dimensional buffers." );
copy( static_cast< const char * >( info.ptr ), info.shape.data(), info.strides.data(), v );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment