Bug introduced in 8.0.4 or earlier and persisting through 11.0.1
First of all, please look at the below inputs and outputs:
In[1]:= $a = Array[# Range[#] &, {5}]
Out[1]= {{1}, {2, 4}, {3, 6, 9}, {4, 8, 12, 16}, {5, 10, 15, 20, 25}}
In[2]:= $af = Flatten[$a, {{1}, {2}}]
Out[2]= {{1}, {2, 4}, {3, 6, 9}, {4, 8, 12, 16}, {5, 10, 15, 20, 25}}
In[3]:= $a === $af
Out[3]= True
In[4]:= FullForm[$a] === FullForm[$af]
Out[4]= True
In[5]:= TreeForm[$a]
Out[5]:=
In[6]:= TreeForm[$af]
Out[6]:=
In[7]:= TreeForm[$a] === TreeForm[$af]
Out[7]= True
Then, I have natural questions:
Why are there the differences between the output of TreeForm[$a] and that of TreeForm[$af]? What makes these differences? Though Mathematica says "True"s for the checking equalities.




TreeForm[Array[ # Range[#] &, {5}]], the first one, is clearly wrong. Also, the output ofTreeForm@Array[Range[#] &, {5}]is even weirder... – Jason B. Jun 30 '16 at 17:39TreeFormwill fail on arrays where the sublists are packed. Compare the output ofDeveloper`PackedArrayQ /@ aandDeveloper`PackedArrayQ /@ $af. A workaround is to unpack the subarrays,TreeForm[$a /. {x_?Developer`PackedArrayQ :> Developer`FromPackedArray[x]}]– Jason B. Jun 30 '16 at 17:47TreeForm@Array[Range[#] &, {5}], I got a very big figure... – Taiki Bessho Jun 30 '16 at 17:47DeveloperPackedArrayQ /@ $a = {True, True, True, True, True}andDeveloperPackedArrayQ /@ $af = {False, False, False, False, False}– Taiki Bessho Jun 30 '16 at 18:02