Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion include/xtensor-python/pycontainer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <cmath>
#include <functional>
#include <numeric>
#include <sstream>

#include "pybind11/complex.h"
#include "pybind11/pybind11.h"
Expand Down Expand Up @@ -338,7 +339,10 @@ namespace xt
{
if(new_dim != N)
{
throw std::runtime_error("Dims not matching.");
std::ostringstream err_msg;
err_msg << "Invalid conversion to pycontainer, expecting a container of dimension "
<< N << ", got a container of dimension " << new_dim << ".";
throw std::runtime_error(err_msg.str());
}
return new_dim == N;
}
Expand Down