It is not clear to me as to what you are trying to do with myfunc(). Is x not the input? More info would be much appreciated. If possible, do print out myfunc and clearly state it’s functionality and how it differs from x.