vector_matrix_functions.py

Define standard vector and matrix functions.

petgem.efem.vector_matrix_functions.delete_duplicate_rows(matrix)[source]

Delete duplicate rows in a matrix.

Parameters:matrix (ndarray) – input matrix to be processed.
Returns:matrix without duplicate rows
Return type:ndarray
petgem.efem.vector_matrix_functions.find_unique_rows(array, return_index=False, return_inverse=False)[source]

Find unique rows of a two-dimensional numpy array.

Parameters:
  • ndarray – array to be processed.
  • return_index (bool) – the indices of array that result in the unique array.
  • return_inverse (bool) – indices of the unique array that can be used to reconstruct array.
petgem.efem.vector_matrix_functions.unitary_test()[source]

Unitary test for vector_matrix_functions.py script.