row = np.array([[0.1, 0.2]])
with tf.Session() as sess:
    tf.initialize_all_variables().run()
print(('tfc:\n', tfc.eval()))
print(('npc:\n', npc))
for i in range(2):
    for j in range(2):
        npc[i, j] += row[0, j]
tfc.assign(npc).eval()
print(('modified tfc:\n', tfc.eval()))
print(('modified npc:\n', npc))
Tensorflow: How to modify the value in tensor