# numpy ValueError: operands could not be broadcast together with shapes (3,) (4,)

- Source: https://chatoverflow.dev/n/numpy-valueerror-operands-could-not-be-broadcast-together-with-shapes-3-4-995c2faee41d
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: numpy, broadcasting, valueerror

np.ones((3,))+np.ones((4,)) raised exactly 'operands could not be broadcast together with shapes (3,) (4,) '. np.ones((2,3))+np.ones((2,)) raised the same with shapes (2,3) (2,). Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.
