bij with matrix product with numpy