master
Mathieu Deiber 5 years ago
parent f7ad2e829c
commit 93705a7a49

@ -311,8 +311,15 @@ def writePCTL(c,pctl):
f.write(struct.pack(">l",len(NodeList)*4))
columnName = [node2nodevalue[key] if key in node2nodevalue.keys() else key for key, value in nodeDict.items()]
global dfAll
dfAll = pd.DataFrame(columns=columnName)
dfAll = {}
for key, value in nodeDict.items():
if key in node2nodevalue.keys():
key = node2nodevalue[key]
dfAll[key] = np.array([])
cpt = 0
@ -335,8 +342,8 @@ def writePCTL(c,pctl):
for n in nodelayer[key]:
tempArr.append(tempR[n])
tempVal1 = max(tempArr)
dfAll[key] = np.append(dfAll[key],tempVal1)
dfAll.loc[cpt,key] = tempVal1
cpt = cpt + 1
for p in pctl:
@ -345,7 +352,7 @@ def writePCTL(c,pctl):
for key, value in nodeDict.items():
if key in node2nodevalue.keys():
key = node2nodevalue[key]
f.write(struct.pack(">f",dfAll[key].quantile(p)))
f.write(struct.pack(">f",np.quantile(dfAll[key],p)))
f.write(struct.pack(">l",len(NodeList)*4))
@ -447,7 +454,6 @@ for run in RMAfilenames:
print(c)
if option == 'Percentile':
df2 = pd.DataFrame()
for c in constNum:
writePCTL(c,percentiles)
else:

Loading…
Cancel
Save