Numpy Apply Function To 2d Arraylist