0
Ich habe versucht, eine sehr einfache .apply auf ein sarray in graph lab create und ich bin verwirrt, warum es nicht funktioniert.GraphLab .apply auf sframe
def myfunc (x):
if(x == 0):
x = -1
sa = SArray([0,0,0,1,1], dtype=int)
sa.apply(myfunc, dtype = int)
Meine Ausgabe ist
[None, None, None, None, None]
Warum ist es nicht [-1, -1, -1, 1, 1], und wie kann ich es beheben?