Skip to content

Commit a66ef80

Browse files
python 3 compatible integer division + deprecated .as_matrix()
1 parent 8dac43f commit a66ef80

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/pyhande/pyhande/lazy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ def lazy_hybrid(calc, md, start=0, end=None, batch_size=1):
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])

0 commit comments

Comments
 (0)