I have this error:
"TypeError: 'float' object is not subscriptable"
This is the part of the code that displays the error:
nd_coord = random.uniform(npoints, 2)
nd_coord[:,0] = nd_coord[:,0] * ((xmax - xmin) + xmin)
nd_coord[:,1] = nd_coord[:,1] * ((ymax - ymin) + ymin)
print (nd_coord)
nd_coord, or checked it's type and/or shape? Clearly it isn't the 2d array that you expect.