You can use an approach based on np.einsum and matrix-multiplication with np.dot as listed below -
# Calculate "((a + b * np.dot(tab[i], vectors[n])) ** d)" part
p1 = (a + b*np.einsum('ij,kj->ki',tab,vectors))**d
# Include "+= coef[0][n] *" part to get the final output
y_vectorized = np.dot(coef,p1)
Runtime test
Dataset #1:
This is a quick runtime test comparing the original loopy approach with the proposed approach for some random values -
In [168]: N = 50
...: M = 50
...: P = 50
...:
...: tab = np.random.rand(N,M)
...: vectors = np.random.rand(P,M)
...: coef = np.random.rand(1,P)
...:
...: a = 3.233
...: b = 0.4343
...: c = 2.0483
...: d = 3
...:
In [169]: %timeit original_approach(tab,vectors,coef,a,b,c,d)
100 loops, best of 3: 4.18 ms per loop
In [170]: %timeit proposed_approach(tab,vectors,coef,a,b,c,d)
10000 loops, best of 3: 136 µs per loop
Dataset #2:
With N, M and P as 150 each, the runtimes were -
In [196]: %timeit original_approach(tab,vectors,coef,a,b,c,d)
10 loops, best of 3: 37.9 ms per loop
In [197]: %timeit proposed_approach(tab,vectors,coef,a,b,c,d)
1000 loops, best of 3: 1.91 ms per loop