Skip to content

Commit

Permalink
Fix bug in distributed graph pybindings
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Mar 6, 2019
1 parent 446d2b0 commit 7e64282
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/python/lib/distributed/distributed_graph.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ namespace distributed {
typedef xt::pytensor<EdgeIndexType, 1> OutType;
typedef typename OutType::shape_type OutShape;
OutShape shape = {uvs.shape()[0]};
OutType out(shape);
OutType out = xt::zeros<EdgeIndexType>(shape);
{
py::gil_scoped_release allowThreads;
for(std::size_t i = 0; i < shape[0]; ++i) {
out[i] = self.findEdge(uvs[0], uvs[1]);
out(i) = self.findEdge(uvs(i, 0), uvs(i, 1));
}
}
return out;
Expand Down

0 comments on commit 7e64282

Please sign in to comment.