File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ def __next__(self):
221221 self .lastcluster_idx = nearest_cluster [0 ] + 1
222222 self .clusters = np .insert (
223223 self .clusters ,
224- int ( self .lastcluster_idx ) ,
224+ self .lastcluster_idx ,
225225 [test_idx , test_idx ],
226226 0 ,
227227 )
@@ -304,8 +304,8 @@ def find_nearest_cluster(self, idx):
304304 # Calculate which of the two nearest clusters is closer
305305 distances = np .array (
306306 [
307- self .x [idx ] - self .x [self .clusters [int ( near_idx ) - 1 , 1 ]],
308- self .x [idx ] - self .x [self .clusters [int ( near_idx ) , 0 ]],
307+ self .x [idx ] - self .x [self .clusters [near_idx - 1 , 1 ]],
308+ self .x [idx ] - self .x [self .clusters [near_idx , 0 ]],
309309 ]
310310 )
311311 if distances [0 ] < np .abs (distances [1 ]):
Original file line number Diff line number Diff line change @@ -888,9 +888,9 @@ def writepwastr(self, comments):
888888 # Generate parameter labels from the baseline function's parameterdict
889889 blf = self .extracted .baseline .owner ()
890890 if blf .npars > 0 :
891- parlbl = blf .parameterdict .keys ()
892- paridx = np .array (blf .parameterdict .values ()).argsort ()
893- lines .append ("# " + " " .join ([ str (parlbl [i ]) for i in paridx ] ))
891+ parlbl = list ( blf .parameterdict .keys () )
892+ paridx = np .array (list ( blf .parameterdict .values () )).argsort ()
893+ lines .append ("# " + " " .join (str (parlbl [i ]) for i in paridx ))
894894 blpars = " " .join ([str (p ) for p in self .extracted .baseline .pars ])
895895 else :
896896 blpars = "(no parameters)"
You can’t perform that action at this time.
0 commit comments