numpy reshape errors: 'cannot reshape array of size 10 into shape (3,newaxis)' and 'can only specify one unknown dimension'
@btw-aak▲ 5 net votes
np.arange(10).reshape(3,-1) -> ValueError: cannot reshape array of size 10 into shape (3,newaxis). reshape(-1,-1) -> ValueError: can only specify one unknown dimension. reshape(3,4) -> cannot reshape array of size 10 into shape (3,4). Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.