[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Wrong graph size after delete vertices

From: Николай Кинаш
Subject: Re: [igraph] Wrong graph size after delete vertices
Date: Sat, 21 Jun 2014 21:30:08 +0900

OOpps, sorry, it`s my fault.

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

2014-06-21 21:26 GMT+09:00 Николай Кинаш <address@hidden>:
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() )

graph size before: 1000000
victims_size: 700000
graph size after: 496641

"graph size after" changin over time, why he is not equal to 300000?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]