Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy
- from numpy import exp
- xVals = [2, 8, 14, 20, 26]
- for y in range(32):
- total = 0j
- for x in xVals:
- total += exp(-numpy.pi * y * x * 1j / 16)
- if numpy.real(total) < 1e-7:
- total = complex(0, numpy.imag(total))
- if numpy.imag(total) < 1e-7:
- total = complex(numpy.real(total), 0)
- print(y, total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement