Hello,
I am a beginner and trying to automate a simple problem. I am reading multiple files one-by-one and saving the data in respective matrices. I would like to make my code short by automating (e.g., by looping).
Would appreciate any suggestions, the files are delimited and named numerically (File_1, File_2, etc.). Here is what I am doing as of now:
I am a beginner and trying to automate a simple problem. I am reading multiple files one-by-one and saving the data in respective matrices. I would like to make my code short by automating (e.g., by looping).
Would appreciate any suggestions, the files are delimited and named numerically (File_1, File_2, etc.). Here is what I am doing as of now:
file1 = np.loadtxt('File_1.txt', delimiter=',') file2 = np.loadtxt('File_2.txt', delimiter=',') ... matrix1 = file1[:,:] matrix2 = file2[:,:] ...