NumPy Vector

Rotate a vector by angle (degree, radian) in NumPy

How to rotate the 2D vector by degree in Python: python from math import cos, sin import numpy as np theta = np.deg2rad(30) rot = ...

Calculate the angle between two vectors in NumPy (Python)

You can get the angle between two vectors in NumPy (Python) as follows. python import numpy as np import numpy.linalg as LA a = np.arra...

NumPy array - Outer product of vectors | Python

The outer product of NumPy vectors can be calculated by `outer`. python import numpy a = numpy.array([1, 2]) b = numpy.array([3, 4]) ...

NumPy dot: How to calculate the inner product of vectors in Python

Here is an example to calculate an inner product of two vectors in Python. python import numpy as np v = np.array([1, 2]) w = np.array(...

NumPy norm: How to calculate the norm of a vector in Python

This is an example to calculate a vector norm using Python NumPy. python import numpy as np from numpy import linalg as LA v = np.array...

NumPy Array

NumPy Matrix

NumPy Statistics

NumPy function

© Rollpie