Commit 4d223cc8 authored by Martin Reinecke's avatar Martin Reinecke

fix

parent 0911de6d
......@@ -2397,7 +2397,7 @@ vector<size_t> makeaxes(const py::array &in, py::object axes)
return res;
}
auto tmp=axes.cast<vector<size_t>>();
if (tmp.size()>size_t(in.ndim()))
if ((tmp.size()>size_t(in.ndim())) || (tmp.size()==0))
throw runtime_error("bad axes argument");
for (size_t i=0; i<tmp.size(); ++i)
if (tmp[i]>=size_t(in.ndim()))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment