sip-python 0.0.3__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sip_python-0.0.3 → sip_python-0.0.4}/PKG-INFO +1 -1
- {sip_python-0.0.3 → sip_python-0.0.4}/pyproject.toml +1 -1
- {sip_python-0.0.3 → sip_python-0.0.4}/src/sip_python/helpers.py +7 -6
- {sip_python-0.0.3 → sip_python-0.0.4}/src/sip_python.egg-info/PKG-INFO +1 -1
- {sip_python-0.0.3 → sip_python-0.0.4}/LICENSE +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/README.md +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/setup.cfg +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/setup.py +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/src/sip_python/__init__.py +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/src/sip_python.egg-info/SOURCES.txt +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/src/sip_python.egg-info/dependency_links.txt +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/src/sip_python.egg-info/requires.txt +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/src/sip_python.egg-info/top_level.txt +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/tests/test_simple_constrained_lqr.py +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/tests/test_simple_lqr.py +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/tests/test_simple_nlp.py +0 -0
- {sip_python-0.0.3 → sip_python-0.0.4}/tests/test_simple_qp.py +0 -0
|
@@ -33,11 +33,10 @@ except Exception:
|
|
|
33
33
|
|
|
34
34
|
def _amd_order(K_csc):
|
|
35
35
|
"""Compute AMD ordering on a CSC matrix via libamd."""
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Ai = K_sym.indices.astype(np.int64)
|
|
36
|
+
K_csc.sort_indices()
|
|
37
|
+
n = K_csc.shape[0]
|
|
38
|
+
Ap = K_csc.indptr.astype(np.int64)
|
|
39
|
+
Ai = K_csc.indices.astype(np.int64)
|
|
41
40
|
perm = np.empty(n, dtype=np.int64)
|
|
42
41
|
ret = _libamd.amd_l_order(
|
|
43
42
|
n,
|
|
@@ -72,6 +71,7 @@ def get_K(P, A, G):
|
|
|
72
71
|
|
|
73
72
|
mod_P = spa.csc_matrix.copy(P)
|
|
74
73
|
mod_P.data[:] = 1.0
|
|
74
|
+
mod_P = mod_P + mod_P.T
|
|
75
75
|
|
|
76
76
|
Z = spa.csc_matrix((y_dim, s_dim))
|
|
77
77
|
|
|
@@ -114,8 +114,9 @@ def get_kkt_and_L_nnzs(K, perm_inv):
|
|
|
114
114
|
permuted_K.col = perm_inv[permuted_K.col]
|
|
115
115
|
|
|
116
116
|
kkt_L_nnz = getLnnz(spa.triu(permuted_K))
|
|
117
|
+
kkt_nnz = spa.triu(permuted_K).nnz
|
|
117
118
|
|
|
118
|
-
return
|
|
119
|
+
return kkt_nnz, kkt_L_nnz
|
|
119
120
|
|
|
120
121
|
|
|
121
122
|
def get_kkt_perm_inv_and_nnzs(P, A, G, verbose=True):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|