OOpps, sorry, it`s my fault.

np.randint() return list with not unique numbers...


2014-06-21 21:26 GMT+09:00 Николай Кинаш <[email protected]>:

> cat test.py
>
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
> import igraph as ig
> import numpy.random as np
>
> g = ig.Graph.Barabasi(1000000, 2)
>
> victims = np.randint(0, g.vcount(), size = 700000)
>
> print "graph size before: " + str( g.vcount() )
> print "victims_size: " + str( len( victims.tolist() ) )
> g.delete_vertices( victims.tolist() )
> print "graph size after: " + str( g.vcount() )
>
>
> ./test.py
> graph size before: 1000000
> victims_size: 700000
> graph size after: 496641
>
> "graph size after" changin over time, why he is not equal to 300000?
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to