Update: WRI Support has considered this a missing feature of MapThread instead of a bug. A request to update MapThread to support ragged arrays has been logged.
MapThread is not mapping over ragged arrays. It is my expectation that it should map given Map's behavior on ragged arrays and no information to the contrary in MapThread's documentation.
Map works fine on ragged array.
Map[f, Range@Range@3, {2}]
{{f[1]}, {f[1], f[2]}, {f[1], f[2], f[3]}}
But MapThread has issues.
MapThread[f,
{
Range@Range@3,
Range@Range@3
},
2]
MapThread::mptd: Object {{1},{1,2},{1,2,3}} at position {2, 1} in MapThread[f,{{{1},{1,2},{1,2,3}},{{1},{1,2},{1,2,3}}},2] has only 1 of required 2 dimensions.
It is complaining about missing dimensions but the two lists are identical. My real problem has over 2 million rows and MapIndex is slower than MapThread.
I think this is a bug. Yes/No?
Win 10 Ent with Mma 11.2
A representative sample of data as requested.
SeedRandom[1122]
raggedDims = RandomInteger[{10, 22}, 150000];
assoc1 = TakeList[
AssociationThread[{"z"}, #] & /@
RandomReal[{0., 10.}, {Total@raggedDims, 1}], raggedDims];
assoc2 = TakeList[
AssociationThread[{"a", "b", "c"}, #] & /@
RandomReal[{0., 10.}, {Total@raggedDims, 3}], raggedDims];
and I was trying to do the below and assign it back to another association with Part. Where data is a list of associations.
data[[All, "key"]] =
MapThread[
Association,
{
assoc1,
assoc2
},
2];


MapThread[MapThread[f, {##}] &, {Range@Range[3], Range@Range[3]}]– Szabolcs Feb 19 '18 at 14:13Range@Range@Range@3. I supposeNestcan be used to generalize the nestedMapThreads. – Edmund Feb 19 '18 at 14:19MapThread[Thread@*f, {Range@Range@3, Range@Range@3}, 1]– user1066 Feb 19 '18 at 14:32