MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _find_numeric_entry

Function _find_numeric_entry

SLiCAP/SLiCAPmath.py:111–130  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

109 return M, factor
110
111def _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
132def _detME(M):
133 dim = M.shape[0]

Callers 1

_eliminateVarsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected