import os
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy
from scipy import signal
def get_sig_from_txt(directory_path, filename):
with open(directory_path + '\\' + filename) as f:
content = f.readlines()
content = [int(x.strip()) for x in content]
return np.array(content)
for filename in dirr:
signal = get_sig_from_txt(path, filename)
idx_peak = signal.find_peaks_cwt(signal, np.arange(1, 16))
I get the error :AttributeError: 'numpy.ndarray' object has no attribute 'find_peaks_cwt' Process. What can I do?