Page 1 of 1

Matrixmultiplikation 2-D und 1-D

Posted: 18 Jan 2025, 21:28
by Guest
Beispiel:

Code: Select all

import numpy as np

x = np.array([[1., 2., 3.], [4., 5., 6.]])
y = np.ones(3)

np.dot(x , y)
Ergebnis:

Code: Select all

array([ 6., 15.])
Wie ist das möglich, wenn ich eine Matrix von (2x3) mal (1x3) habe? Es sollte eine 3x1-Matrix sein.