Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
b2ed6f34
Commit
b2ed6f34
authored
Jan 23, 2013
by
Tiago Peixoto
Browse files
Fixes bug when edge/vertex_hist are called for non-scalar types
parent
14055716
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph/stats/graph_histograms.cc
View file @
b2ed6f34
...
...
@@ -30,6 +30,13 @@ python::object
get_vertex_histogram
(
GraphInterface
&
gi
,
GraphInterface
::
deg_t
deg
,
const
vector
<
long
double
>&
bins
)
{
try
{
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
;
...
...
Tiago Peixoto
@count0
mentioned in issue
#106 (closed)
·
Aug 06, 2014
mentioned in issue
#106 (closed)
mentioned in issue #106
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment