Returns the (row, col) position of the first numeric entry in the matrix. :param M: sympy matrix :type M: sympy.Matrix() :return: (row, col) - row (int): row number of first numeric entry (-1 if not found) - col (int): column number of first nume
(M)
| 109 | return M, factor |
| 110 | |
| 111 | def _find_numeric_entry(M): |
| 112 | """ |
| 113 | Returns the (row, col) position of the first numeric entry in the matrix. |
| 114 | |
| 115 | :param M: sympy matrix |
| 116 | :type M: sympy.Matrix() |
| 117 | |
| 118 | :return: (row, col) |
| 119 | |
| 120 | - row (int): row number of first numeric entry (-1 if not found) |
| 121 | - col (int): column number of first numeric entry (-1 if not found) |
| 122 | :rtype: tuple |
| 123 | """ |
| 124 | dim = M.shape[0] |
| 125 | r, c = -1, -1 |
| 126 | for i in range(dim): |
| 127 | for j in range(dim): |
| 128 | if M[i, j] != 0 and M[i, j].is_number: |
| 129 | return i, j |
| 130 | return r, c |
| 131 | |
| 132 | def _detME(M): |
| 133 | dim = M.shape[0] |