When creating a post, please add:
- Week # must be added in the tags option of the post. week 2
- Link to the classroom item you are referring to: Coursera | Online Courses & Credentials From Top Educators. Join for Free | Coursera
- Description (include relevant info but please do not post solution code or your entire notebook)
a=np.random.randn(3,3)
b=np.random.randn(3,1)
c=a∗b
What will be c? (If you’re not sure, feel free to run this in python to find out).
I don’t understand the answer, which one is correct ? I did try out the code on jupyter lab, it did ran fine and seems broadcasting ? Why the answer says incorrect ? or a “dot product” is “real broadcasting” ?
f = np.random.randn(3, 3)
g = np.random.randn(3, 1)
print(f)
print(g)
h = f * g
print(h)
[[ 1.0018774 0.75395032 0.20840968]
[-0.43446762 -0.91685108 0.06553869]
[ 2.41612123 0.56578568 1.21728828]]
[[ 1.56902888]
[-0.51308923]
[-0.57096744]]
[[ 1.57197458 1.18296982 0.32700081]
[ 0.22292065 0.47042642 -0.0336272 ]
[-1.37952656 -0.3230452 -0.69503198]]