i have a list that contains other lists as shown in the following example:
[[1,2,3],[4,5,6],[7,8,9],[10,11,12],...]
i want to have a single list that contains only the values of the enclosed lists.for example:
[1,2,3,4,5,6,7,8,9,10,11,12,...]
i referred to the following post
https://sparkbyexamples.com/numpy/numpy-concatenate-arrays/#:~:text=Use%20concatenate()%20to%20Join,returns%20a%20Numpy%20array%20ndarray.
and i used np.hstack but the result i received is as shown below in the output section.
please let me know how to merge values of enclosed lists in a single list
output
heightsArray:
[list([1.9661040306091309, 10.696208953857422, 1.0679383277893066, 6.53984260559082, 12.38330078125, 12.179215431213379, 8.06540298461914, 19.222919464111328, 19.79438591003418, 19.253231048583984, 6.721851348876953])
list([1.2531325817108154, 5.737852096557617, 3.964620590209961, 24.72264862060547, 16.951587677001953, 4.4727044105529785, 17.585798263549805, 2.271346092224121, 22.467714309692383, 1.1433072090148926, 6.62084436416626, 24.711875915527344, 18.40561866760254, 31.604272842407227, 30.53916358947754, 1.032033920288086, 22.378520965576172, 29.499256134033203, 1.9997328519821167, 1.8659427165985107, 22.315698623657227, 5.942968368530273, 23.89557647705078, 2.586153507232666, 22.498411178588867, 27.25722885131836, 3.971294641494751, 1.193315863609314])
list([1.686007022857666, 19.417757034301758, 16.713016510009766, 1.9263691902160645])
list([4.8433709144592285, 20.437376022338867, 4.989529132843018, 4.614073753356934, 1.11526358127594, 19.341903686523438, 6.8073320388793945, 9.306018829345703, 3.783479690551758, 22.015480041503906, 8.731091499328613, 13.0647554397583, 5.900130748748779, 21.051692962646484, 9.68826675415039, 12.436420440673828, 6.481836318969727, 20.05198860168457, 27.733850479125977, 9.441649436950684, 3.9559082984924316, 2.1406052112579346, 3.38968563079834, 20.699975967407227, 11.571341514587402, 17.989410400390625, 12.477356910705566, 7.2546210289001465, 5.889671325683594, 2.5819091796875, 1.6263765096664429])
list([2.62542986869812, 16.040987014770508, 3.1247355937957764, 15.41856575012207, 3.738638401031494, 17.532419204711914, 14.698928833007812, 4.150491714477539, 6.318861484527588, 12.403081893920898, 5.659346103668213, 6.7704176902771, 12.969916343688965, 20.74340057373047])
list([3.1012823581695557, 2.4679620265960693, 6.375152111053467, 6.634308338165283, 13.107415199279785, 13.794085502624512, 2.78353214263916, 2.835921287536621, 1.8563297986984253, 1.6136845350265503, 11.284193992614746, 15.272016525268555, 12.039650917053223, 17.890539169311523, 1.5754039287567139, 2.072760820388794, 4.551220893859863, 9.063619613647461, 9.008346557617188, 18.153240203857422, 1.5515965223312378, 3.021090030670166, 1.077278971672058, 1.7640812397003174, 7.224135398864746, 19.563329696655273, 3.2121834754943848, 10.056761741638184, 2.070772647857666])
list([7.907066822052002, 11.766679763793945, 10.989029884338379, 21.0689640045166, 9.267064094543457, 10.231385231018066, 21.138431549072266, 9.76909351348877, 20.78786277770996, 9.75920581817627, 8.588343620300293, 14.696967124938965, 5.743011951446533, 11.014046669006348])
list([3.896557092666626, 13.957764625549316, 5.719233512878418, 6.1857709884643555, 11.28347110748291, 5.386732578277588, 2.7518086433410645, 14.987642288208008, 4.448116302490234, 3.604461669921875, 1.2020549774169922, 12.1959810256958, 3.928103446960449, 13.142932891845703, 3.571805238723755])
list([21.782691955566406, 1.2042707204818726, 24.170419692993164, 4.8170270919799805, 17.38825225830078, 25.00199317932129, 1.3215477466583252, 1.301278829574585, 1.927947998046875, 3.339961528778076, 21.08298110961914, 13.615286827087402, 1.7241873741149902, 1.9475493431091309, 21.140451431274414, 1.7616485357284546, 26.994413375854492, 1.2447105646133423, 22.51232147216797, 14.633712768554688, 1.6656463146209717, 20.70401382446289, 26.275915145874023, 1.5619595050811768, 1.7305235862731934, 1.1124624013900757, 20.38242530822754, 2.9700927734375, 2.1872940063476562])
list([2.4143996238708496, 2.9640443325042725, 2.64925479888916, 2.7397959232330322, 6.296701431274414, 2.423492908477783, 3.740741729736328, 6.211856842041016, 5.617546081542969, 2.790623426437378, 7.019254684448242, 6.861749172210693, 5.737977027893066, 7.715272903442383, 7.0724945068359375, 6.249215126037598, 7.514536380767822, 7.559080600738525, 7.059352397918701, 5.864587306976318, 7.74525785446167, 8.104219436645508, 6.454973220825195, 1.804422378540039, 6.732247352600098, 7.40091609954834, 6.735324382781982, 6.118360996246338, 7.454169750213623, 6.875509738922119, 5.487492084503174, 5.792536735534668, 6.847222805023193, 7.365022659301758, 7.416168689727783, 6.546361446380615, 6.1300458908081055, 4.812787055969238, 4.688291072845459])