Source code for pyleecan.Methods.Import.ImportMatrix.edit_matrix
# -*- coding: utf-8 -*-
from numpy import transpose
[docs]def edit_matrix(self, matrix):
"""To apply transformation on the matrix
Parameters
----------
self : ImportMatrix
An ImportMatrix object
matrix: ndarray
The matrix to edit
Returns
-------
matrix: ndarray
The edited matrix
"""
if self.is_transpose:
return transpose(matrix)
return matrix