Vector Algebra

When a scalar is combined with a vector, NumPy broadcasts the scalar across every vector element. Combining two vectors of the same length applies arithmetic operations element by element. A scalar can appear on either side of a vector ari…

1 sources - 4 claims

When a scalar is combined with a vector, NumPy broadcasts the scalar across every vector element. Combining two vectors of the same length applies arithmetic operations element by element. A scalar can appear on either side of a vector arithmetic operator through Python reverse operator methods. Vector operations with mismatched lengths raise an error.