Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'skip:[ 20': 0.03; 'that?': 0.05; '[1,': 0.09; 'received:216.32.180': 0.09; '2],': 0.16; '[2,': 0.16; 'nick': 0.16; 'numpy': 0.16; 'thanks,': 0.18; 'to:name:python-list@python.org': 0.20; 'to:2**1': 0.23; 'received:169.254': 0.24; 'command': 0.24; 'header:In-Reply-To:1': 0.25; 'looks': 0.26; 'necessary.': 0.27; 'received:216.32': 0.27; 'array': 0.29; 'received:169': 0.29; 'header:Received:8': 0.30; 'to:addr:python-list': 0.33; 'list': 0.35; 'received:bigfish.com': 0.35; 'there': 0.35; 'charset:us-ascii': 0.36; 'subject:: ': 0.38; 'received:10': 0.38; 'to:addr:python.org': 0.39; 'received:216': 0.62; 'received:169.254.8': 0.84; 'stereo': 0.84 X-Forefront-Antispam-Report: CIP:157.56.236.229; KIP:(null); UIP:(null); IPV:NLI; H:BY2PRD0611HT005.namprd06.prod.outlook.com; RD:none; EFVD:NLI X-SpamScore: -1 X-BigFish: PS-1(zz4015Izz1202h1d1ahzzz2fh2a8h668h839h944hd25hf0ah107ah1220h1288h12a5h12a9h1155h) Received-SPF: pass (mail75-co1: domain of npcinternational.com designates 157.56.236.229 as permitted sender) client-ip=157.56.236.229; envelope-from=nick.cash@npcinternational.com; helo=BY2PRD0611HT005.namprd06.prod.outlook.com ; .outlook.com ; From: Nick Cash To: Wanderer , "python-list@python.org" Subject: RE: Numpy combine channels Thread-Topic: Numpy combine channels Thread-Index: AQHNj4wrX2iRaRAAskamuNzsdzBtRZeD+ylw Date: Mon, 10 Sep 2012 19:50:09 +0000 References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [70.166.238.194] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: npcinternational.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347307538 news.xs4all.nl 6957 [2001:888:2000:d::a6]:33087 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28847 > I have an array generated by audiolab of left and right stereo > channels. It looks like [[1,1],[1,2],[2,3]]. I would like to combine > the left and right channels to get an array [2,3,5]. Is there a numpy > command to do that? You may be over-thinking this, and numpy might not be necessary. A simple solution would be just a quick list comprehension: stereo_array =3D [[1, 1], [1, 2], [2, 3]] mono_array =3D [l+r for (l, r) in stereo_array] Thanks, Nick Cash