How to convert 2-D array to 1-D which combine one dimension's element together?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to convert 2-D array to 1-D which combine one dimension's element together?

alex
This post has NOT been accepted by the mailing list yet.
I'm working with numpy,Now I want to convert a 2-D array to 1-D array which combine x-axis to one element. Does any one know numpy has any function to do this?

For an example:

Original:                                            

x = [[00,01,10,11],                              
      [10,01,11,01],
      [11,01,00,10],
      [00,01,00,11]]

Converted:

y= [[00011011],
      [10011101],
      [11010010],
      [00010011]]