ehh in contradiction to what I said earlier ~ vectorized operations provide a giant speed up. ~
http://i.imgur.com/Oo92T.png -> i'm using numpy arrays in both cases. How about having the declarations be more simple and then packing / unpacking only for the math portion? Also you could split this into chunks + do it in parallel to get some additional speed boosts. On 17 December 2012 09:15, Guillaume Gay <[email protected]>wrote: > Le 17/12/2012 15:14, Tiago de Paula Peixoto a écrit : > > On 12/17/2012 11:59 AM, Guillaume Gay wrote: > > Is there a way to do the following differently: > > edge_x = g.new_edge_property() > edge_x.a = np.array([x[e.source()] for e in g.edges()]) > > with x being a vector property map. > I plain English, is there a (more efficient) way to copy the vertex property > map of every edge source to an edge property map? > > Something like this is not yet available, you have to use a python loop > for now. > > However I plan to add something like this at some point, since it occurs > often enough. If you wish, you may open a ticket, and I'll address when > time permits. > > Cheers, > Tiago > > > > > > _______________________________________________ > graph-tool mailing > [email protected]http://lists.skewed.de/mailman/listinfo/graph-tool > > Ok I'll do that, thanks! > > G. > > _______________________________________________ > graph-tool mailing list > [email protected] > http://lists.skewed.de/mailman/listinfo/graph-tool > >
_______________________________________________ graph-tool mailing list [email protected] http://lists.skewed.de/mailman/listinfo/graph-tool
