Python Convert Numpy Array From Function