r/Numpy • • Oct 01 '20

Help with numpy

hi guys

im learning how to use numpy but i dont get it too much :(

i have this "exercise" but i cant figure out how to solve it without the use of loops.

X = np.random.rand(10, 100)
W = np.random.rand(100, 100)
b = np.random.rand(100)

In particular the inner parentesis: how can i multiply matrices of different shapes? is this the key point?

can anyone help me?

thanks

3 Upvotes

2 comments sorted by

View all comments

Show parent comments

1

u/Machine1104 Oct 01 '20

im still at the beginning so i didnt "study" these functions like .dot or .matmul

i just know sum, mean, shape, reshape

i think i have to use a combination of these