Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109344

2d matrix into Nx3 column data

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Anup reni <foxprone.r52@gmail.com>
Newsgroups comp.lang.python
Subject 2d matrix into Nx3 column data
Date Thu, 2 Jun 2016 13:57:02 +0530
Lines 13
Message-ID <mailman.79.1464857505.1839.python-list@python.org> (permalink)
References <CAC0KhVV_=qKSq7ykEoDQ_spyXBc1xsLjyj=-roHOZ5AntunuOg@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de ueP0UODJTQvMgC+RiHN8MgP6VpMLyb4UVZBDUDhmX0/Q==
Return-Path <foxprone.r52@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.059
X-Spam-Evidence '*H*': 0.89; '*S*': 0.01; 'subject:into': 0.09; 'received:209.85.218': 0.10; '-1.00': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'skip:n 90': 0.16; 'transform': 0.18; 'this:': 0.23; 'message-id:@mail.gmail.com': 0.27; 'received:google.com': 0.35; 'something': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'sans': 0.72; '0.8': 0.84; 'vera': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=pNos8cJcu0KtRKaHMb2sERJVJ4b9IT+CTrMQBLOCwhk=; b=QXviLXuBtlTWPq/XiL2p27mOq9KbgXPyeS//soIXYIG9FNT9iprq2KSfTb8Vf6wTe5 Cf3RWk0mjc6HtU+DS19Qk8LfKwQm3/OEloo+nMelTDsOqJDNQS+lV0lGDNbueU3zXnr6 0Hh+W6BIyIqsmciMmpRXgUG5LYxmyB+rwhqw0s/G9zIoCY0dTZZY/sNCywmu5ZCqQ7WQ lFxTDFLtOj0urOXrTJUI3wD0jnExiAMmpTUSImci7lK9dc2R9LcPDgU3/LIYVCVe6z8d uLAEc461lNMtHOYy3q/TlzOFx0iMGbG3qgSPKgb3hjqRHWL8mlrCOxV5wc/17flHpYGV 4qKQ==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=pNos8cJcu0KtRKaHMb2sERJVJ4b9IT+CTrMQBLOCwhk=; b=UN9YahMi687ItRgR3JlFcvEn2WKiLO0ditGtqhLnnmOjaNLhAwNqQQ08HZRo9ENLCU m1xFLPCBM3sUKBXo5GFuR2bx7st/RPCWOrBSYqsM/mat1w9M/tkTna0qvd4runDlAqe1 x3NjdhoLikpYlqKG/Y1Np7GPWFsdS4AXb02fzAz/WW+PGkHzKske7Ps3K1tnd3nIcDQY NfzjvQncZwLHJCX7yDLch46ZQJVA98VLq5tR7T1hZVYctC4G4+dVBuTEe6Sopsz40+GT kl7EJxo2LV2Bmf1S+8wpG/71SdaFANZQrlPFpcc7nT7zGaH9m4NMAf3s4jZKtrOogH8v Wq4w==
X-Gm-Message-State ALyK8tJD1JJkrGtz/yDNL+c2+Yt0y5KozaPmmnnQ5di5dBAw8JLl4q10dkCSzB263hcxKBOpWgg5sRLMlnARnA==
X-Received by 10.157.4.49 with SMTP id 46mr5780007otc.195.1464856022571; Thu, 02 Jun 2016 01:27:02 -0700 (PDT)
X-Mailman-Approved-At Thu, 02 Jun 2016 04:51:44 -0400
X-Content-Filtered-By Mailman/MimeDel 2.1.22
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <CAC0KhVV_=qKSq7ykEoDQ_spyXBc1xsLjyj=-roHOZ5AntunuOg@mail.gmail.com>
Xref csiph.com comp.lang.python:109344

Show key headers only | View raw


i would like to transform this:

      -1     0-0.8  0.64 -0.36-0.4  0.16 -0.84
 0.0     0 -1.00
 0.4  0.16 -0.84
 0.8  0.64 -0.36

to something like this:

     x  y  result
id                1  -0.8 -1    0.642  -0.8  0   -0.363  -0.4 -1
0.164  -0.4  0   -0.845   0.0 -1    0.006   0.0  0   -1.007   0.4 -1
 0.168   0.4  0   -0.849   0.8 -1    0.6410  0.8  0   -0.36

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

2d matrix into Nx3 column data Anup reni <foxprone.r52@gmail.com> - 2016-06-02 13:57 +0530

csiph-web