Port over some numpy math and *.src file codegen