Replace vector aithmetics with NumPy equivalents