I have an array in which all of the elements in the array are also arrays:
a = [[array([ 4.15167139]) array([ 2.80260218]) array([ 3.34189103])
array([ 3.73434426]) array([ 3.76504973]) array([ 3.91946708])
array([ 2.850741]) array([ 1.9985034]) array([ 4.05191836])
array([ 3.46145848]) array([ 2.99489689]) array([ 2.60462582])
array([ 1.91031189]) array([ 2.90006744]) array([ 3.69799451])
array([ 3.83314665]) array([ 4.42917628]) array([ 5.17647658])
array([ 4.63462677]) array([ 4.69085313]) array([ 4.84746095])
array([ 5.04396694]) array([ 5.10152712]) array([ 3.33442499])
array([ 4.87380637]) ...]]
I want this to be the same shape array that it is now (20,96) but instead of all of the elements within this array being arrays I would just like them to be floats:
a = [[ 4.15167139 2.80260218 3.34189103...4.87380637 ...]]
What is the best way to iterate over this array and change all of the elements from individual arrays to floats?
concatenate(orstack) to join arrays.a=np.array(a).astype(np.float)?