scikit-dsdp
==============
scikit-dsdp provides Python interface to DSDP semidefinite programming library. The DSDP package implements a dual-scaling algorithm to find solutions (X, y) to linear and semidefinite optimization problems of the form
inf tr(CX)
subject to AX = b
X >= 0
with (AX)_i = tr(A_iX) where X >= 0 means X is positive semidefinite, C and all A_i are symmetric matrices of the same size and b is a vector of length m.
The dual of the problem is
sup b'y
subject to A'y + S = C
S >= 0
where A'y = \sum_{i=1}^m y_i A_i.
Matrices C and A_i are assumed to be block diagonal structured, and must be specified that way (see Details).
Example
============
from pydsdp.dsdp5 import dsdp
from numpy import matrix
A = matrix([
[10, 4, 4, 0],
[0, 0, 0, -8],
[0, -8, -8, -2]])
b = matrix ([
[48] ,
[-8],
[20]])
c = matrix ([
[-11] ,
[0] ,
[0] ,
[23]])
K = {} # K is a dictionary for sizes of different cones
K['s'] = [2]
result = dsdp(A, b, c, K)
Dependencies
============
scikit-dsdp depends on NumPy and SciPy.
Install
=======
pip install scikit-dsdp
Development
===========
Code
----
You can check the latest sources with the command::
git clone https://github.com/zhisu/scikit-dsdp.git
or if you have write privileges::
git clone git@github.com:zhisu/scikit-dsdp.git
cd scikit-dsdp
make install-pre-commit
make install
Testing
-------
make run-tests
Misc
-------
The Makefile makes it easy to perform the most common operations:
* make check-all # runs linting and uv.lock checks
* make check-lint # checks for linting issues
* make check-lock # verifies the uv.lock is aligned to pyproject.toml
* make clean # cleans the virtual environment and caches
* make default # runs a default set of checks on the code
* make fix-all # formats the code, fixes lint errors and runs locks uv.lock to pyproject.toml
* make fix-format # formats the code
* make fix-lint # fixes linting issues
* make fix-lint-unsafe # fixes linting issues potentially adding inadvertant bugs
* make help # outputs the different make options
* make install # build install the distribution
* make install-pre-commit # installs pre-commit hooks
* make lock # locks uv.lock to pyproject.toml
* make install-pre-commit # installs pre-commit hooks
* make run-tests # runs the unit tests
* make sync # syncs the python environment with uv.lock
.vscode/settings.json is set so that unit tests can be run without further configuration.
Releasing
============
If you have sufficient permissions, you will be able to make new releases that are published to
https://pypi.org/project/scikit-dsdp/
Releases are made from the main branch.
1. Select Run workflow from https://github.com/zhisu/scikit-dsdp/actions/workflows/bump-version.yml
2. Be sure that the main branch is selected and press Run workflow
3. This will automatically create a new tag and publish to pypi
4. A new release will be present https://github.com/zhisu/scikit-dsdp/releases that you can then fill out and publish.
Important Note
==============
This modules was originally developed by zhisu and the original repo can be found at
https://github.com/zhisu/scikit-dsdp
This fork is being maintained by jamieleecho.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Metadata
Release files for jlc-scikit-dsdp 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jlc_scikit_dsdp-0.3.tar.gz | 179.0 kB | Details |
Release files / jlc_scikit_dsdp-0.3.tar.gz
| Download URL | jlc_scikit_dsdp-0.3.tar.gz |
|---|---|
| Size | 179.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ce8f30a45cc3f51a897392fddc60c524115fb821b552be4573ecb7e094e5ad5
|
|
BLAKE2b-256 checksum How to use checksums |
842ab47b382eb71ef2bc77d23d109fb4818416526d6321a79072251650d607dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 2, 2025.
Transparency log