🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

sksparse-minimal

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sksparse-minimal

A drop in replacement for sksparse for sparse Cholseky factorization

0.2
PyPI
Maintainers
1

sksparse_minimal

This project is forked from https://github.com/rgl-epfl/cholespy

Changes made:

  • Add support for all solving modes (CHOLMOD_A, CHOLMOD_L, CHOLMOD_Lt, CHOLMOD_P, etc)
  • Remove support for GPU solving (because I didn't want to bother implementing it for all modes and I didn't need it)
  • Emulate sksparse API for ease of use
  • Change CHOLMOD configuration to match sksparse
  • Update build to match recommendations from https://nanobind.readthedocs.io/en/latest/building.html

Installing

pip install sksparse_minimal

From source

git clone --recursive https://github.com/tansey-lab/sksparse_minimal.git
pip install .

Example usage

import numpy as np
from sksparse_minimal import SparseCholesky
from scipy.sparse import csc_matrix

M = np.array([[4, 12, -16],
           [12, 37, -43],
           [-16, -43, 98]], dtype=np.float64)

M = csc_matrix(M)

sparse_cholesky = SparseCholesky(M)

b = np.array([1, 2, 3], dtype=np.float64)

sparse_cholesky.solve_A(b)

Keywords

cholesky sksparse

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts