I have four numpy arrays, and example given below:
a1=np.array([[-24.4925, 295.77 ],
[-24.4925, 295.77 ],
[-14.3925, 295.77 ],
[-16.4125, 295.77 ],
[-43.6825, 295.77 ],
[-22.4725, 295.77 ]])
a2=np.array([[-26.0075, 309.39 ],
[-24.9975, 309.39 ],
[-14.8975, 309.39 ],
[-17.9275, 309.39 ],
[-46.2075, 309.39 ],
[-23.9875, 309.39 ]])
a3=np.array([[-25.5025, 310.265 ],
[-25.5025, 310.265 ],
[-15.4025, 310.265 ],
[-17.4225, 310.265 ],
[-45.7025, 310.265 ],
[-24.4925, 310.265 ]])
a4=np.array([[-27.0175, 326.895 ],
[-27.0175, 326.895 ],
[-15.9075, 326.895 ],
[-18.9375, 326.895 ],
[-48.2275, 326.895 ],
[-24.9975, 326.895 ]])
I want to make all possible combinations between arrays and at the same time concatenate, for example:
array[-24.4925, 295.77, -26.0075, 309.39, -25.5025, 310.265, -27.0175, 326.895]
and
array[-24.4925, 295.77, -26.0075, 309.39, -25.5025, 310.265, -27.0175, 326.895]
that is [a1[0],a2[0],a3[0],a4[0]]
, [a1[0],a2[0],a3[0],a4[1]]
and so on
what is the fastest method to it other than to loop over the four arrays?!