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
This simple code takes 2 vectors, slices them and then does element-wise multiplication. The output as expected is another vector full of 0 except where we placed the outputs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I noticed something strange in my code, especially when I handle slicing for a vector vs a matrix.
This simple code takes 2 vectors, slices them and then does element-wise multiplication. The output as expected is another vector full of 0 except where we placed the outputs.
If I do the same thing with matrices:
This is strange because I expected the last 2 columns to be filled with 0 not with original values.
Anyone has an idea why this is happening?
Beta Was this translation helpful? Give feedback.
All reactions