help with TypeError

I am running this code
def between(g):
import distribution as di
btween = betweenness(g)
v_btween = btween[0].get_array()
e_btween = btween[1].get_array()
v_dist = di.distribution(v_btween)
e_dist = di.distribution(e_btween)
print e_dist

def distribution(inlist):
import numpy as np
x = np.array(inlist)
c = np.bincount(x)
y = np.nonzero(c)[0]
value = y
count = c[y]
li = [value,count]
return li
and I am getting this error
TypeError: Cannot cast array data from dtype('float64') to dtype('int64')
according to the rule 'safe'

i tried dtype =np.int64 but then the values are getting rounded to 0 please
help. ASAP

attachment.html (1.85 KB)

I cannot help you if you don't provide a self-containing example which
I can reproduce and shows exactly where the error occurs.