I have to buidl a grid with 256 point by the command:
a = arange(-15,16,2)
L = len(a)
cnstl = a.reshape(L,1)+1j*a
My problem is that I have a big data array that contains the data round the points in cnstl. I want to slice the point to the closest cnstl point and also compute the error. The condition is in the middle of the two point in x and y axis. I can do it in a for loop. Since Python and numpy have a lot of magic, I want to find an efficient way to do. This problem arise from QAM 256 modulation.

Windows Live™ Hotmail®:…more than just e-mail. Check it out.