| X = [[-0.4838731, 0.08083195], [ 0.93456167, -0.50316134]]
|
| G = [[ 0.19960269, 0.20993069], [-0.85814751, -0.41418101]]
|
|
|
| # flatten
|
| X = X.reshape(X.shape[0]*X.shape[1])
|
| G = G.reshape(G.shape[0]*G.shape[1])
|
|
|
| output = [G[i] if x >= 0 else 0 for x,i in enumerate(X)]
|