Re: Something like Flatten
- To: mathgroup at smc.vnet.net
- Subject: [mg8579] Re: [mg8541] Something like Flatten
- From: "w.meeussen" <meeussen.vdmcc at vandemoortele.be>
- Date: Sun, 7 Sep 1997 22:13:01 -0400
- Sender: owner-wri-mathgroup at wolfram.com
sounds familiar ...
does the following inspire you?
In[27]:=it=Table[{{i*j*k}},{i,2},{j,i},{k,j},{g,2}]
Out[27]=
{{{{{{1}}, {{1}}}}}, {{{{{2}}, {{2}}}},
{{{{4}}, {{4}}}, {{{8}}, {{8}}}}}}
In[28]:=it/.{z_?NumericQ}->z
Out[28]=
{{{{{1}, {1}}}}, {{{{2}, {2}}}, {{{4}, {4}}, {{8}, {8}}}}}
In[29]:=Map[p,it,{-2}]
Out[29]=
{{{{{p[{1}]}, {p[{1}]}}}},
{{{{p[{2}]}, {p[{2}]}}},
{{{p[{4}]}, {p[{4}]}}, {{p[{8}]}, {p[{8}]}}}}}
wouter.
At 23:16 6-09-97 -0400, Hans Steffani wrote:
>I have a list of list of (list of one number). How can I get a
>list of list of numbers? Flatten does not work as the outer but
>not the inner braces are deleted.
>
>Hans Friedrich Steffani
>--
>Hans Friedrich Steffani
>Institut fuer Elektrische Maschinen und Antriebe, TU Chemnitz-Zwickau
>mailto:hans.steffani at e-technik.tu-chemnitz.de
>http://www.tu-chemnitz.de/~hfst/
>
>
>
>
Dr. Wouter L. J. MEEUSSEN
eu000949 at pophost.eunet.be
w.meeussen.vdmcc at vandemoortele.be