Flatten—Wolfram言語ドキュメント
reference.wolfram.com › language › refFlatten [ f [ e, …]] は,頭部が f の部分式を平坦にする.. m ij が行列のとき, Flatten [ { { m 11, m 12 }, { m 21, m 22 } }, { { 1, 3 }, { 2, 4 } }] は,実質的に「ブロック」 m ij から単一の行列を構築する.. Flatten [ list, { { i 1 }, { i 2 }, …. }] は, list 中のレベル i k が結果で ...
Mathematica: flatten a nested list with repetitions - Stack ...
https://stackoverflow.com › mathe...One way: ArrayFlatten[Distribute[#, List] & /@ lis, 1]. => {{1, 2}, {3, 4}, {3, 5}, {3, 6}, {7, 8}, {7, 9}, {10, 11}}. Edit. Or ArrayFlatten[Thread /@ lis ...
Tensor Contraction
groups.google.com › g › compNov 12, 2010 · The way I did it for my own little tensor package is to tensor product the two together, transpose both of the relevant indices you want to contract to the first indices, then run Tr to contract them (call it
Flatten—Wolfram Language Documentation
reference.wolfram.com › language › refFlatten [ list, { { i 1 }, { i 2 }, … }] effectively transposes levels in list, putting level i k in list at level k in the result. Note that the function Transpose in effect uses an inverse of this specification. Flatten flattens out levels in SparseArray objects just as in the corresponding ordinary arrays. ».