Hi,
I've got some c++ code(which i don't have much experience in).
I'm trying to write the same code again in python but i'm not having much luck.
The c++ code creates an array of x,y co-ordinates:
for (double ix = 0; ix < nlat; ix++)
{
for (double iy = 0; iy < nlat; iy++)
{
ipart = ipart+1
xy[0][ipart]=ix*s;
xy[1][ipart]=iy*s;
}
}
I've tried the folliwing python code but am having no luck
xy=(1,1)
xy=list(xy)
for x in range(0,nlat):
for y in range(0,nlat):
ipart=ipart+1
xy[0][ipart] =y*s
xy[1][ipart] =y*s
can anyone see where I'm going wrong? I've also tried removing the line converting from a tuple to a list but no joy.
Thanks in advance