I have trying to do a very simple .apply to an sarray in graph lab create and I am confused as to why it is not working.
def myfunc (x):
if(x == 0):
x = -1
sa = SArray([0,0,0,1,1], dtype=int)
sa.apply(myfunc, dtype = int)
My output is
[None, None, None, None, None]
Why is it not [-1, -1, -1, 1, 1] and how can I fix it?