Module utils

Source
Expand description

Misc functions mainly for vector and matrix manipulation.

Functionsยง

cross
compute the cross product between two vectors
dot
compute the dot product between a vector and a matrix
idot
compute the integer dot product between a vector and a matrix
invert_lattice
calculates the inverse of a 3x3 lattice if it is invertible
norm
compute the norm of a vector
transpose_square
compute M.T * M
vacuum_index
returns the first index that is not vacuum from a sorted index list
vdot
compute the dot product between two vectors
vsum
compute the sum of two vectors