MCPcopy Create free account
hub / github.com/ByteDance-Seed/Depth-Anything-3 / solve_sparse

Function solve_sparse

da3_streaming/fastloop/solve_python.py:23–33  ·  view source on GitHub ↗

Solve linear system A * delta = b, supports submatrix solving

(A: csc_matrix, b: np.ndarray, freen: int)

Source from the content-addressed store, hash-verified

21
22
23def solve_sparse(A: csc_matrix, b: np.ndarray, freen: int) -> np.ndarray:
24 """Solve linear system A * delta = b, supports submatrix solving"""
25 if freen < 0:
26 return spsolve(A, b)
27 else:
28 A_sub = A[:freen, :freen].tocsc()
29 b_sub = b[:freen]
30 delta_sub = spsolve(A_sub, b_sub)
31 delta = np.zeros_like(b)
32 delta[:freen] = delta_sub
33 return delta
34
35
36def solve_system_py(

Callers 1

solve_system_pyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected