Skip to content

Commit

Permalink
Call getattr
Browse files Browse the repository at this point in the history
  • Loading branch information
kryzar committed Aug 9, 2024
1 parent a1c9106 commit fef5d05
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def frobenius_charpoly(self, var='X', algorithm=None):
method_name = f'_frobenius_charpoly_{algorithm}'
if not hasattr(self, method_name):
raise NotImplementedError(f'algorithm "{algorithm}" not implemented')
self._frobenius_charpoly = getattr(self, method_name)
self._frobenius_charpoly = getattr(self, method_name)()
return self._frobenius_charpoly.change_variable_name(var)

def _frobenius_charpoly_CSA(self):
Expand Down Expand Up @@ -904,7 +904,7 @@ def frobenius_trace(self, algorithm=None):
matrix_method_name = f'_frobenius_matrix_{algorithm}'
if not hasattr(self, matrix_method_name):
raise NotImplementedError(f'algorithm "{algorithm}" not implemented')
matrix = getattr(self, matrix_method_name)
matrix = getattr(self, matrix_method_name)()
trace = matrix.trace()
A = self.function_ring()
self._frobenius_trace = A([x.in_base() for x in trace])
Expand Down

0 comments on commit fef5d05

Please sign in to comment.