I try using manim to plot the fourier transform of a function but it gives me this error as i use the fft()
method.
from manim import *
from numpy import sin
import numpy as np
class sampling(Scene):
def construct(self):
t = np.arange(-2*PI,2*PI,0.01)
sr = len(t)/(4*PI)
x=[]
for i in range(len(t)):
x.append(sin(t[i]))
X = np.fft(x)
N = len(X)
n = np.arange(N)
T = N/sr
freq = n/T
plane2 = NumberPlane(x_range=[-1,3],y_range=[-1,1],x_length=4,y_length=2).add_coordinates()
plane2_graph=plane2.plot(np.abs(X/N),freq,color=GOLD_C)
the error that I get:
TypeError: 'module' object is not callable
I was expecting every thing to workout, i don't even understand this error.