from scipy import *

dump = open("dumpkinetic", mode='r')

dummy = dump.readline()

sumModesN = 55

def stringarraytoarray(lineread, sizeSquare):
    dummy2 = lineread.replace(',','')
    dummy3 = dummy2.replace(']','')
    dummy4 = dummy3.replace('[','')
    dummyFinal = dummy4.split()

    target = [None]*sumModesN
    m = 0
    for i in range(sumModesN):
        target[i] = [0]*sumModesN
        for j in range(sumModesN):
            if abs(float(dummyFinal[m]))>10**-12:
                target[i][j] = float(dummyFinal[m])
            else:
                target[i][j] = 0.0
            m += 1

    return target

kineticArray = stringarraytoarray(dummy,sumModesN)

print kineticArray

##dump2 = open("dumpkinetic2", mode='w')
##dump2.write(str(kineticArray))
##dump.close()
##dump2.close()

