Loading views...

Numpy broadcasting

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2023 May 25 6:15
Editor
Edited
Edited
2026 Aug 9 23:6
Refs
Refs

In-place semantics

(2, 3) + (3,) # -> (2, 3) (3,) + (2, 1) # -> (2, 3)
With broadcasting, the shape of the in-place tensor does not change.
notion image
1차원은 broadcasting되는데 2차원부터 안되니까 1차원만 되는 이유
차원 없다면 뒤부터 둔다
notion image
So in the first case above, the 3 cannot be placed in the middle.
 
 

Backwards compatibility

 
 

Recommendations