I am really struggling to understand how to perform calculations with numpy arrays.
myList = open('key_resp.csv')
newList = np.array(myList)
newList2=sorted(newList)
newLists = open("dataSorted.csv",'w')
writer = csv.writer(newLists)
writer.writerow(newList2)
medNumber=np.median(newLists)
fast = newList2[:len(newList2)//2]
slow = newList2[len(newList2)//2:]
dataFast = open("dataFast.csv",'w')
writer = csv.writer(dataFast)
writer.writerow(fast)
Now for every value in dataFast I want to subtract medNumber.
dataFast.csv looks like [0.1] [0.2] [0.3] in csv file.
sortmethod. Usingsortedwill convert them to a pythonlistand you will loose any advantage of speed/memory you had with the arrays.