Changes¶
v0.5.0¶
Upgrading from v0.4.x¶
The sksparse.cholmod module has undergone major API changes in this
release. Please see the API Changes section below
for a detailed list of changes. The new API is not backward compatible with
previous versions, so code written for v0.4.x will need to be updated to work
with v0.5.0. Code can be upgraded using the following changes to the
sksparse.cholmod API:
API Change |
v0.4.x |
v0.5.0 |
|---|---|---|
Symbolic Analysis |
|
|
|
|
|
Numeric Factorization |
|
|
|
|
|
kwargs |
|
|
|
|
|
|
not used |
|
Solving Linear Systems |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Modifying Factorization |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Extracting Factors |
|
|
if not f.is_ll:
f.change_factor(kind="LL")
L = f.L
|
||
|
if f.is_ll:
f.change_factor(kind="LDL")
LD = scipy.sparse.csc_array(f.factor)
|
|
|
|
|
if f.is_ll:
f.change_factor(kind="LDL")
L, D = f.L, f.D
|
||
|
|
|
if f.is_ll:
f.change_factor(kind="LDL")
D = f.D
|
||
|
|
|
Permuting Vectors |
|
|
|
|
API Changes¶
Major API updates to the
sksparse.cholmodmodule. The module has been updated to resemble the existingscipy.linalg.cholesky()interface, as well as provide additional functions present in the SuiteSparse CHOLMOD MATLAB interface, and MATLAB built-in Cholesky functions. The underlying Cython code has been refactored to provide greater type safety and performance.The
cholmod.Factorclass has been renamed toCholeskyFactor.The
cholmod.Commonclass has been removed. Its attributes have been subsumed into theCholeskyFactorclass.The
cholesky()function now returns acsc_arrayinstead of aFactorobject, and an optionalndarraycontaining the permutation vector.The
ldl()function has been added. It returns a tuple (csc_array,csc_array), and an optionalndarraycontaining the permutation vector.A
cho_factor()function has been added to perform the numeric Cholesky factorization and return aCholeskyFactorobject.Similarly, a
ldl_factor()function has been added to perform the numeric LDL factorization and return aCholeskyFactorobject.The
cholmod.analyzefunction has been removed. The analysis step is now performed when calling the constructor ofCholeskyFactor.The
use_longparameter has been removed from thecholesky()andldl()functions. The type of indices is now inferred from the input matrix.The
modeparameter has been renamed tosupernodal_mode.The
symmetricparameter has been removed. It has been replaced by two new parameters:lower, andsym_kind.Parameter
lowercontrols whether to use the lower or upper triangular part of the input matrix, or whether to return a lower or upper triangular factor.Parameter
sym_kindhas been added. It accepts a string argument in{"sym", "row", "col"}, which controls the symmetry structure of the matrix to analyze.
The functions
cholmod.analyze_AAtandcholmod.cholesky_AAthave been removed. Usecho_factor()orcholesky()withsym_kind="row"instead.The
ordering_methodparameter has been renamed toorder.The
FactormethodsL,D,LD,L_D, andP, have been removed in favor of the methodsget_factor()andget_perm().The properties
permandfactorhave been added to return read-only views of the permutation vector and factor matrix, respectively.The
Factormethodssolve_A,solve_LDLt,solve_LD,solve_DLt,solve_L,solve_Lt, andsolve_Dmethod have been replaced by thesolve()method.The
CholeskyFactoris not callable.The
Factor.apply_PandFactor.apply_Ptmethods have been removed. Usep = f.get_perm(); x_p = x[p]andx = x_p[np.argsort(p)]instead.The new
solve()method checks the condition number and raises aCholmodNotPositiveDefiniteErrorif the matrix is exactly singular, or aCholmodWarningif the matrix is ill-conditioned. Previously, no warning would be issued. See thercondproperty for more details.Add multiple properties to the
CholeskyFactorclass for convenient access tocholmod_factorattributes. See the full documentation for details.Fix a bug in the previous version where sparse inputs with inconsistent
has_sorted_indicesorhas_canonical_formatflags would silently lead to incorrect results. The input matrix is now modified into a canonical CSC format, regardless of the input format.Add support for single-precision (float32/complex64) input matrices. The output factor and solve results will match the input precision. Previously, all inputs were converted to double-precision.
Create the
amdmodule, which provides the AMD ordering method.Create the
btfmodule, which provides the BTF ordering method.Create the
camdmodule, which provides the constrained AMD ordering method.Create the
colamdmodule, which provides the COLAMD ordering method.Create the
ccolamdmodule, which provides the constrained COLAMD ordering method.Create the
klusubmodule, which provides an interface to the KLU sparse LU solver.Create the
spqrsubmodule, which provides an interface to the SPQR sparse QR solver.Create the
umfpacksubmodule, which provides an interface to the UMFPACK sparse LU solver.Remove support for the following versions:
Python < 3.10
NumPy < 2.0
SciPy < 1.14
SuiteSparse < 7.4.0
Python 3.9 reached its end of life in October 2025. Numpy ended support for all 1.x versions in September 2025. SciPy v1.14 (released June 2024) will be supported until the end of 2026. SuiteSparse 7.4.0 introduces single precision support in CHOLMOD 5.1.0.
v0.4.4¶
Bug in solve with dense array, where base of result is not set correctly, fixed.
Travis tests are using conda now.
Supported versions updated to:
Python: 3.7, 3.6
NumPy: 1.15, 1.14, 1.13
SciPy: 1.1, 1.0, 0.19
SuiteSparse: 5.2
v0.4.3¶
The method
Factor.solve_Lcan now also use the L matrix of the LL’ decomposition.Supported versions updated to:
Python: 3.6, 3.5
NumPy: 1.14, 1.13
SciPy: 1.0, 0.19
v0.4.2¶
Bug where the ordering method is not taken into account is fixed.
The Factor class has now a (public) copy method.
v0.4.1¶
Bug with relaxed stride checking in NumPy 1.12 fixed.
Supported versions updated to:
Python: 3.6, 3.5, 3.4, 2.7
NumPy: 1.8 to 1.12
v0.4¶
64-bit indices (type long) are now supported.
The ordering method for Cholesky decomposition is now choosable.
Specific exceptions subclasses are now thrown for each error condition.
Setup does not rely on an installed Cython anymore.
v0.3.1¶
Ensure that arrays returned by the
Factor.solve_...methods are writeable.
v0.3¶
Dropped deprecated
Factor.solve_PandFactor.solve_P.Fixed a memory leak upon garbage collection of
Factor.
v0.2¶
Factorsolve methods now return 1d output for 1d input (just likenumpy.dot()does).Factor.solve_PandFactor.solve_Pdeprecated; useFactor.apply_PandFactor.apply_Ptinstead.New methods for computing determinants of positive-definite matrices:
Factor.det,Factor.logdet,Factor.slogdet.New method for explicitly computing inverse of a positive-definite matrix:
Factor.inv.Factor.Dhas much better implementation.Build system improvements.
Wrapper code re-licensed under BSD terms.
v0.1¶
First public release.