You can wrap your code in "```" for readability:
import numpy as np
a = np.array([1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0])
print( ' '.join("%5.3f" % abs(f) for f in np.fft.fft(a)) )
You can wrap your code in "```" for readability:
import numpy as np
a = np.array([1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0])
print( ' '.join("%5.3f" % abs(f) for f in np.fft.fft(a)) )