You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
broadcastPointwiseAdd:: (Numericre, MutablerIx2e, ManifestrIx1e) =>ArrayrIx2e->ArrayrIx1e->ArrayrIx2e
broadcastPointwiseAdd m v = m !+! (compute .Massiv.transpose . expandWithin Dim1 (fst. unconsSz . size $ m) const$ v)
test::IO()
test =dolet w = compute $ resize' (Sz (2:.3)) (0...5) ::ArrayUIx2Intlet b = compute (0...2) ::ArrayUIx1Intprint w
print b
print$ w `broadcastPointwiseAdd` b
pure()
For example:
I frequently need operations like this when writing machine learning code.
Related: #60.
The text was updated successfully, but these errors were encountered: