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


Groups > comp.lang.python > #109370

Re: 2d matrix into Nx3 column data

From Michael Selik <michael.selik@gmail.com>
Newsgroups comp.lang.python
Subject Re: 2d matrix into Nx3 column data
Date 2016-06-02 14:31 +0000
Message-ID <mailman.97.1464877890.1839.python-list@python.org> (permalink)
References <CAC0KhVV_=qKSq7ykEoDQ_spyXBc1xsLjyj=-roHOZ5AntunuOg@mail.gmail.com> <CAGgTfkMJZu508A2OqO_ugWXxsEEKsD35=-mvF9SSLCB5eG4uxA@mail.gmail.com>

Show all headers | View raw


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.

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


Thread

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

csiph-web