[Tutor] Converting a numpy matrix to a numpy array
David Crisp
david.crisp at gmail.com
Thu Mar 31 05:41:38 CEST 2011
Hello,
I have a very simple question / problem I need answered. The problem
is imnot entirely sure of the correct terminology and langauge to use
to describe it. (One of the reasons im using this miling list)
I have a 2d matrix representing the X the Y and the Z value of a
point. I wish to convert that matrix to an array. What is a good
way of doing so?
Eg:
Matrix
012345
0xooooo
1xooooo
2oxxxxx
3oooooo
4ooooox
5ooooox
I want to convert that to a 2d array which looks like:
0,0,x
0,1,o
0,2,o
0,3,o
0,4,o
0,5,o
.......
5,4,o
5,5,o
I am pretty sure it is simple. I'm just having a brain fade.
Regards,
David
More information about the Tutor
mailing list