why cannot recalculate?
These code work fine
html("
html("<h1>
From Dictionary to Matrix
(1)")
(1)</h1>")
@interact
def newtarph( D=input_box(default={0:{1:3}, 1: {0: 2, 4: 2, 5: 2}, 2: {0: 3, 1: 4}}, label='Dictionary')):
E=[]
for u in D.keys():
for i in range(len(D.values()[u])):
E.append([u, D.values()[u].keys()[i], D.values()[u].values()[i]])
print
matrix(E)matrix(E)
These other code d'ont work:
html("
html("<h1>
From Dictionary to Matrix
(1)")
(1)</h1>")
@interact
def newtarph( D=input_box(default={1: {0: 2, 4: 2, 5: 2}, 2: {0: 3, 1: 4}}, label='Dictionary')):
E=[]
for u in D.keys():
for i in range(len(D.values()[u])):
E.append([u, D.values()[u].keys()[i], D.values()[u].values()[i]])
print
matrix(E)matrix(E)