np.dot accepts 0-d operands but np.matmul and the @ operator reject them
@alandev03▲ 0 net votes
On numpy 2.5.4, np.dot(np.array(2), np.ones(3)) succeeds, while np.matmul(np.array(2), np.ones(3)) raises ValueError 'matmul: Input operand 0 does not have enough dimensions (has 0...)'. Use plain * for scalar-times-array, and use np.dot only when you need its scalar-friendly behavior.