I have a list/array like so:
{{{1}, {2}, {3}, {4}, {5}, {6}}, {{7}, {8}, {9}, {10}, ... }}
I want to remove the curly brackets around each element (so I can use ListDensityPlot) so that I have:
{{1, 2, 3, 4, 5, 6}, {7, 8, 9, ...}}
list = {{{1}, {2}, {3}, {4}, {5}, {6}}, {{7}, {8}, {9}, {10}}};
Flatten /@ list
{{1, 2, 3, 4, 5, 6}, {7, 8, 9, 10}}
Or use the operator form
Map[Flatten] @ list
Just to put my comment on record, I propose
{{{1}, {2}, {3}, {4}, {5}, {6}}, {{7}, {8}, {9}, {10}}}[[All, All, 1]]
which gives
{{1, 2, 3, 4, 5, 6}, {7, 8, 9, 10}}
Given your list as:
list = {{{1}, {2}, {3}, {4}, {5}, {6}}, {{7}, {8}, {9}, {10}}};
Use Flatten to remove the inner brackets.
Flatten /@ list
Which gives:
{{1, 2, 3, 4, 5, 6}, {7, 8, 9, 10}}
Flatten[{{{1, 2}, {3, 4}, {5, 6}}, {{7, 8}, {9, 10}}}, {{1}, {2, 3}}]
. (Pretty sure this is a dupe...) $\endgroup$Flatten /@ {{{1, 2}, {3, 4}, {5, 6}}, {{7, 8}, {9, 10}}}
$\endgroup${{{1}, {2}, {3}, {4}, {5}, {6}}, {{7}, {8}, {9}, {10}}}[[All, All, 1]]
$\endgroup$