Skip to content
Advertisement

python iterate over arrays matrices

I am trying to create a new matrix(array)

JavaScript

where

JavaScript

I have been scouring the documentation in numpy but can’t find a function to satisfy this.

JavaScript

Advertisement

Answer

You’re looking for numpy.matmul. You’ll need to make the vectors have two dimensions (with a size of one in one of the dimensions). For example:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement