Replace madlib_construct_array with allocateArray
Replace inverse() with pseduo inverse