vector changes to matrix at computation
I managed to fix it by using a temp variable, setting it to correct size, and iterating over dsdb1. i still don't know what caused the bug.
This is probably a rookie mistake that I'm missing somewhere but I can't for the life of me find anything related to my problem on the web.
I have a vector b1 of size 5 by 1, and i have another vector dsdb1 which is also 5 by 1.
When I write b1 += tau*dsdb1 I get the error "non-broadcastable output operand with shape (5,1) doesn't match the broadcast shape (5,5)"
Now, no one of these is a matrix. I even deleted this line and instead printed both sizes for b1 and dsdb1. For b1 it printed (5,1) and for dsdb1 it printed (5,). tau is just a scalar.
Why is it changing dsdb1 to a 5 by 5 matrix when computing?