Commit ee88bdef authored by Marius Kriegerowski's avatar Marius Kriegerowski
Browse files

avoid memory-expensive copy caused by argmax

parent d9271886
......@@ -401,7 +401,11 @@ def scan(
wmin <= tpeak and tpeak < wmax]) or ([], [])
tr_stackmax_indx = tr_stackmax.copy(data=False)
imaxs = num.argmax(frames, axis=0)
imaxs = num.zeros(len(frames))
for iframe, frame in enumerate(frames):
imaxs[iframe] = num.argmax(frame)
tr_stackmax_indx.set_ydata(imaxs.astype(num.int32))
tr_stackmax_indx.set_location('i')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment