Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
javidahmed64592 committed Apr 11, 2024
1 parent 6d7cbe7 commit b229291
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/math/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,9 @@ def map(matrix: Matrix, func: Callable) -> Matrix:
def to_array(self) -> List[float]:
"""
Return Matrix as a list of floats.
Returns:
matrix_list (List[float]): Matrix as list of floats
"""
return cast(List[float], self.data.tolist()[0])
matrix_list = self.data.tolist()[0]
return cast(List[float], matrix_list)

0 comments on commit b229291

Please sign in to comment.