def create_contexts_target(corpus, window_size=1):
target = corpus[window_size:-window_size]
contexts = []

for idx in range(window_size, len(corpus)-window_size):
cs = []
for t in range(-window_size, window_size + 1):
if t == 0:
continue
cs.append(corpus[idx + t])
contexts.append(cs)

return np.array(contexts), np.array(target)

contexts, target = create_contexts_target(corpus, window_size=1)
corpus = [0, 1, 2, 3, 4, 5, 6]



이 함수를 실행하면 contexts는 6x2 배열이 되는데,


반복문에서 t값이 -1 부터 2까지 주어지니까 6x3 배열이 되어야 되는거 아님?
내가 뭘 놓쳤는지를 모르겠음 ㅅㅂ