Code: Alles auswählen
from numpy import *
x=arange(4)+0.2
x=int(x) #funktioniert nicht
Code: Alles auswählen
from numpy import *
x=arange(4)+0.2
x=int(x) #funktioniert nicht
Code: Alles auswählen
for y in x:
x[y] = str(y)
Code: Alles auswählen
from numpy import *
Code: Alles auswählen
import numpy
Code: Alles auswählen
In [83]: x = numpy.arange(4) + 0.2
In [84]: x
Out[84]: array([ 0.2, 1.2, 2.2, 3.2])
In [85]: x.astype(int)
Out[85]: array([0, 1, 2, 3])