I can not understand why it gives an error:
if t[i] >= 0 or t[i] < 1/2: IndexError: invalid index to scalar variable.
snippet code:
import numpy as np def mother_wavelet(t): for i in range (0, np.size(t)): if t[i] >= 0 or t[i] < 1/2: mat_psi = 1 elif t[i] >= 1/2 or t[i] <= 1: mat_psi = -1 else: mat_psi = 0 return mat_psi