Commit b2ed6f34 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fixes bug when edge/vertex_hist are called for non-scalar types

parent 14055716
......@@ -30,6 +30,13 @@ python::object
get_vertex_histogram(GraphInterface& gi, GraphInterface::deg_t deg,
const vector<long double>& bins)
if (!belongs<vertex_scalar_properties>()(get<boost::any>(deg)))
throw ValueException("Vertex property must be of scalar type.");
catch (boost::bad_get&){}
python::object hist;
python::object ret_bins;
......@@ -44,6 +51,9 @@ python::object
get_edge_histogram(GraphInterface& gi, boost::any prop,
const vector<long double>& bins)
if (!belongs<edge_scalar_properties>()(prop))
throw ValueException("Edge property must be of scalar type.");
python::object hist;
python::object ret_bins;
Supports Markdown
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