Exemplo n.º 1
0
 static void get_shape(object obj, shape_t& shape)
 {
     shape.clear();
     object py_shape = obj.attr("shape");
     const std::size_t N = len( py_shape );
     for( std::size_t i = 0; N != i; ++i )
         shape.push_back( extract<std::size_t >(py_shape[i]));
 }