Reputation: 25
So my matrix A shape is (10,) and matrix B shape is (10,50). How can I change my matrix B shape from (10,50) into (10,) so that I can subtract it with my matrix A?
Upvotes: 0
Views: 80
Reputation: 40668
You can do so by broadcasting theta
to a two-dimensional array (here shaped (10, 1)
):
>>> theta[:,None] - gamma
Upvotes: 1