13 lines
234 B
Python
13 lines
234 B
Python
import pickle
|
|
|
|
from k2c import k2c
|
|
|
|
with open("Y.dat", "rb") as file:
|
|
Y = pickle.load(file)
|
|
M = Y.shape[0]
|
|
W = Y.max(axis=1)
|
|
I = W.cumsum()
|
|
K = (I - W / 2) / I.max()
|
|
with open("C.dat", "wb") as file:
|
|
pickle.dump(k2c(K), file)
|