User 2013 | 8/17/2015, 4:57:00 PM
I have a case that need to transform my array to a new array with using the history data for each element. How I could do it efficiently in a gl way? Now I converted the SArray to python List and do the transformation in a pure python way, but I am worrying this might not be a scalable way for large volume of data.
The transformation in details are as follows. e.g. orgarray is a SArray object. orgarraypython = list(orgarray) windowsize =10 newlist= for i in range(orgarray.size()): start = max(0,i-windowsize) tmpvalue = max(orgarraypython[start:i+1]) # I need do some calculation for each element like a window sliding operation newlist.append(tmpvalue) newlistgl = gl.SArray(newlist)