Working on converting the working python code to Gnumpy