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


Groups > comp.lang.python > #109344

2d matrix into Nx3 column data

From Anup reni <foxprone.r52@gmail.com>
Newsgroups comp.lang.python
Subject 2d matrix into Nx3 column data
Date 2016-06-02 13:57 +0530
Message-ID <mailman.79.1464857505.1839.python-list@python.org> (permalink)
References <CAC0KhVV_=qKSq7ykEoDQ_spyXBc1xsLjyj=-roHOZ5AntunuOg@mail.gmail.com>

Show all headers | 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