@@ -68,7 +68,7 @@ def find_starting_iteration_mser_min(data, md, start_max_frac=0.9, n_blocks=100,
6868 if end is None :
6969 end = data ['iterations' ].iloc [- 1 ]
7070 before_end_indx = data ['iterations' ] <= end
71- data_before_end = data . ix [before_end_indx ]
71+ data_before_end = data [before_end_indx ]
7272
7373 list = data_before_end ['Proj. Energy' ]
7474 n_data = len (list )
@@ -128,16 +128,16 @@ def lazy_hybrid(calc, md, start=0, end=None, batch_size=1):
128128 if end is None :
129129 end = calc ['iterations' ].iloc [- 1 ]
130130 before_end_indx = calc ['iterations' ] <= end
131- data_before_end = calc . ix [before_end_indx ]
131+ data_before_end = calc [before_end_indx ]
132132
133133 after_start_indx = data_before_end ['iterations' ] >= start
134134 calc_tr = data_before_end [after_start_indx ]
135135
136136 #list = calc_tr['Proj. Energy'].as_matrix()
137137 #n_data = len(list)
138138
139- list_org = calc_tr ['Proj. Energy' ].as_matrix ()
140- n_data = len (list_org ) / batch_size
139+ list_org = calc_tr ['Proj. Energy' ].values
140+ n_data = len (list_org ) // batch_size
141141 list = [0 ]* n_data
142142 for i in range (n_data ):
143143 list [i ] = numpy .mean (list_org [i * batch_size :(i + 1 )* batch_size ])
@@ -392,7 +392,7 @@ def lazy_block(calc, md, start=0, end=None, select_function=None,
392392 if extract_rep_loop_time :
393393 to_block .append ('time' )
394394
395- mc_data = calc .ix [indx , to_block ]
395+ mc_data = calc .loc [indx , to_block ]
396396 if mc_data ['Shift' ].iloc [0 ] == mc_data ['Shift' ].iloc [1 ]:
397397 if calc ['Shift' ][~ indx ].iloc [- 1 ] == mc_data ['Shift' ].iloc [0 ]:
398398 warnings .warn ('The blocking analysis starts from before the shift '
@@ -417,7 +417,7 @@ def lazy_block(calc, md, start=0, end=None, select_function=None,
417417 if calc_inefficiency :
418418 # Calculate quantities needed for the inefficiency.
419419 dtau = md ['qmc' ]['tau' ]
420- reblocked_iters = calc .ix [indx , 'iterations' ]
420+ reblocked_iters = calc .loc [indx , 'iterations' ]
421421 N = reblocked_iters .iloc [- 1 ] - reblocked_iters .iloc [0 ]
422422
423423 # This returns a data frame with inefficiency data from the
@@ -636,7 +636,7 @@ def find_starting_iteration(data, md, frac_screen_interval=300,
636636 # Default end is the last iteration.
637637 end = data ['iterations' ].iloc [- 1 ]
638638 before_end_indx = data ['iterations' ] <= end
639- data_before_end = data . ix [before_end_indx ]
639+ data_before_end = data [before_end_indx ]
640640
641641 # Find the point the shift began to vary.
642642 variable_shift = data_before_end ['Shift' ] != data_before_end ['Shift' ].iloc [0 ]
0 commit comments