Re: Flattening out subexpressions
- To: mathgroup at smc.vnet.net
- Subject: [mg6814] Re: [mg6777] Flattening out subexpressions
- From: Xah Lee <xah at best.com>
- Date: Mon, 21 Apr 1997 02:02:38 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
At 7:08 AM -0400 4/18/97, seanross at worldnet.att.net wrote: >> At 2:37 AM -0400 4/18/97, seanross at worldnet.att.net wrote: >> >Does anyone know how to conveniently partition a 64x64x2x3 array into a >> >64x64x6 array, effectively Flatten-ing out the innermost dimension? >> >Flatten seems to work from the top down. My first guess is to first >> >Flatten, then Partition. Is there a better way? Use Flatten and Map with a level spec. e.g. myList = Array[f,{4,3,2}] Map[Flatten,myList,2] Xah xah at best.com http://www.best.com/~xah/SpecialPlaneCurves_dir/specialPlaneCurves.html Mountain View, CA, USA