For loop strange order of execution

asked 2015-12-20 20:41:34 +0200

kakaz gravatar image

On server I have run this code:

for k in [0..(len(G)-1)]:
    graphics_array([G[k][2].plot(color_by_label={'p':'black', 'r':'blue'}),G[k][3].plot(color_by_label={'p':'black', 'r':'blue'}),G[k][4].plot(color_by_label={'p':'black', 'r':'blue'})])

and I obtain correct effect, that is two elements ( which is text) G[k][0],G[k][1] and then plot for 3 additional elements in graphics array 1x3.

On my own instance of sagemath ( ver. 6.8) there is complete different! The same code produces first list of 36 elements of G[k][0],G[k][1] and thet 36 plots.

Is this normal?

edit retag flag offensive close merge delete


slelievre gravatar imageslelievre ( 2015-12-28 10:07:14 +0200 )edit