Partition of multi dimension list
- To: mathgroup at smc.vnet.net
- Subject: [mg52736] Partition of multi dimension list
- From: "Bruyndonckx P." <pbruynd at vub.ac.be>
- Date: Sat, 11 Dec 2004 05:21:51 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I have a list of about 5 million items. Each item is a list of 7 integer numbers (hence a 5000000x7 array). I want to partition this array on the values of two numbers in each item. The third number (out of seven) goes from 0 to 63 and the fifth number is either 0 or 1. So I want to end up with 64*2 partitions. The fastest solution I have found up to now to do this on the list 'c' is Flatten[CategoryLists[c, {_}, {_}, Range[64] - 1, {_}, {0,1}, {_}, {_}][[1, 1]], 4]. Since I am not a real expert in Mathematica, can anybody suggest me a possible faster and/or cleaner way to achieve this. Thanks, Peter
- Follow-Ups:
- Re: Partition of multi dimension list
- From: DrBob <drbob@bigfoot.com>
- Re: Partition of multi dimension list