Closed magsol closed 8 years ago
Actually I do not get what do you mean about "length" and "pnumber" ? do you mean for example by introducing the "file_s" as input that 2 parameters can be inferred?
Yes, precisely. On line 93 where you read the data S
, after doing this you can infer P
and T
from this data structure; if I'm not mistaken, P
is the number of rows, and T
the number of columns.
May I use following code to infer P and L ? import numpy as np from numpy import linalg as sla
S = np.loadtxt('s.txt') y = np.shape(S) l = y[0] p = y[1] print(y,p,l) =================== out put ========== (100, 5) 100 5 [Finished in 0.4s]
It's done! Thanks.
At first glance, I suspect
length
andpnumber
can be inferred from the data read into the program.