I have a file which contains numeric as well as string/text data. I want all the numeric data to be stored in an array (ignoring non-numeric data). If the file was purely numeric I could do this using numpy.loadtxt. However, this is not the case. An example file is shown here
BEGIN FILE
SECTION1-TEXTINFO
------------------------------------------------------
2.768000 0.000001 0.000001
0.000001 2.644491 -0.000018
0.000001 -0.000018 2.572420
------------------------------------------------------
SECTION2
------------------------------------------------------
2.768000 0.000001 0.000001
0.000001 2.644491 -0.000018
0.000001 -0.000018 2.572420
------------------------------------------------------
SECTION3
------------------------------------------------------
0.000343 -0.000000 -0.000000
-0.000000 0.039522 -0.000000
-0.000000 -0.000000 0.029825
------------------------------------------------------
END FILE
So at the end of the day, I want to store all numeric data in a 9*3 array.
Thank you very much for your help in advance