python flatten array to 1d