Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

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



  • 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