Re: GridBox coming back unevaluated
- To: mathgroup at smc.vnet.net
- Subject: [mg65590] Re: GridBox coming back unevaluated
- From: albert <awnl at arcor.de>
- Date: Mon, 10 Apr 2006 02:31:10 -0400 (EDT)
- References: <e15eha$2r1$1@smc.vnet.net> <e17fjl$om3$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
> DisplayForm[GridBox[Partition[ToExpression[Range[9]],3],
> RowLines->True, ColumnLines->True]]
>
> Apparently, the output from Range in the form of boxes is not being
> interpreted. The function ToExpressions forces the boxes to be
> interpreted as a Mathematica expression.
just in case someone cares: in this case the problem seems not to be with
wrapper boxes but that in one case the list of numbers is a packed array:
In[75]:=
Developer`PackedArrayQ[Partition[Range[9],3]]
Out[75]=
True
In[77]:=
Developer`PackedArrayQ[Table[3i+j,{i,0,2},{j,1,3}]]
Out[77]=
False
and Gridbox obviously doesn't like this. So this will help also:
GridBox[Developer`FromPackedArray[ttt], RowLines -> True,
ColumnLines -> True] // DisplayForm
I dont't think it is a very user-friendly feature that you will need
functions from the Developer` context to understand why GridBox doesn't
like the Range-version, so I wonder if there are good reasons why GridBox
doesn't accept PackedArrays ?
albert