[Numpy-discussion] Numpy capabilities?
hinsen at cnrs-orleans.fr
Sun Jan 25 11:21:00 CST 2004
On 25.01.2004, at 19:33, Nancy Keuss wrote:
> I will be working a lot with matrices, and I am wondering a few things
> before I get started with NumPy:
> 1) Is there a function that performs matrix multiplication?
Yes, Numeric.dot(matrix1, matrix2)
> 2) Is there a function that takes a tensor product, or Kronecker
> product, of
> two matrices?
Yes, Numeric.multiply.outer(matrix1, matrix2)
> 3) Is it possible to concatenate two matrices together?
Yes: Numeric.concatenate((matrix1, matrix2))
> 4) Is there a way to insert a matrix into a subsection of an already
> existing matrix. For instance, to insert a 2x2 matrix into the upper
> hand corner of a 4x4 matrix?
Yes: matrix4x4[:2, :2] = matrix2x2
More information about the Numpy-discussion