MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Something like Flatten


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



  • Prev by Date: Re: Re: Q: Union and precision.
  • Next by Date: Re: Question about Normal[] and O[]
  • Previous by thread: Re: Something like Flatten
  • Next by thread: Something like Flatten