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


Groups > comp.lang.python > #109370 > unrolled thread

Re: 2d matrix into Nx3 column data

Started byMichael Selik <michael.selik@gmail.com>
First post2016-06-02 14:31 +0000
Last post2016-06-02 14:31 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: 2d matrix into Nx3 column data Michael Selik <michael.selik@gmail.com> - 2016-06-02 14:31 +0000

#109370 — Re: 2d matrix into Nx3 column data

FromMichael Selik <michael.selik@gmail.com>
Date2016-06-02 14:31 +0000
SubjectRe: 2d matrix into Nx3 column data
Message-ID<mailman.97.1464877890.1839.python-list@python.org>
On Thu, Jun 2, 2016 at 4:57 AM Anup reni <foxprone.r52@gmail.com> wrote:

> 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
>

It's hard to read your example. Could you write it out more simply? Perhaps
with comma separators instead of spaces? It might help to also give some
context around why you want to make the transformation.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web