Convert 2d Array To 1d Python