sedumipy
A MATLAB/Octave-free Python port of SeDuMi — an interior-point solver for linear (LP), second-order cone (SOCP), and semidefinite (SDP) programs — as a standalone C kernel library plus a Python (NumPy/SciPy) package. No MATLAB or GNU Octave runtime is needed to install or run it.
It solves conic programs over a symmetric cone K — one call gives you
both sides of the primal-dual pair:
\begin{aligned}
\text{(P)} \quad \min_{x} \;\; & c^\top x
& \qquad \text{(D)} \quad \max_{y,\,s} \;\; & b^\top y \\
\text{s.t.} \;\; & Ax = b, \;\; x \in K
& \qquad \text{s.t.} \;\; & A^\top y + s = c, \;\; s \in K^{*}
\end{aligned}
K is a product of blocks of five kinds — free, nonnegative orthant,
second-order (Lorentz), rotated Lorentz, and positive semidefinite — so
LP, SOCP, and SDP are the cases where every block is of one kind, and a
single problem may mix them freely. An LP, for instance:
import numpy as np
import sedumipy
# minimize 7*x1 + 4*x2 + 10*x3
# subject to 3*x1 + 1*x2 + 2*x3 = 9
# 1*x1 + 2*x2 + 4*x3 = 8
# x1, x2, x3 >= 0
A = np.array([[3.0, 1.0, 2.0], # one row per equality constraint
[1.0, 2.0, 4.0]])
b = np.array([9.0, 8.0]) # their right-hand sides
c = np.array([7.0, 4.0, 10.0]) # objective coefficients
K = {"l": 3} # all 3 variables are >= 0
x, y, info = sedumipy.sedumi(A, b, c, K)
# x = [2., 3., 0.] the optimum, costing c @ x = 26
Here x is the primal optimum and y the dual one; K = {"l": 3} says
all three variables are nonnegative. This mirrors original SeDuMi's own
[x, y, info] = sedumi(A, b, c, K) call.
The usage guide defines
each cone and works a mixed LP + SOCP + SDP model end to end, from the
written constraints down to A, b, c, and K.
New contributor? Read CONTRIBUTING.md first — it
has the current phase-by-phase status, the porting workflow this project
follows, known scope limitations, and the prioritized list of remaining
work.
Status
LP, second-order-cone (SOCP), and semidefinite (SDP, K.s) problems are
all fully ported and verified against original Octave/SeDuMi output, to
tight numerical tolerances, including on published
SDPLIB
and DIMACS benchmark problems (see
Benchmarks below). Dense-column preconditioning is also
implemented. Wheels are published to PyPI for Linux (manylinux), macOS
and Windows by wheels.yml's
cibuildwheel job (the Windows build uses an MSYS2/MinGW toolchain and
has only been exercised on GitHub Actions' hosted runner, not
hand-verified on a real Windows machine) — see
CONTRIBUTING.md for the full phase-by-phase status
and known limitations.
Installation
pip install sedumipy
Wheels cover CPython 3.10-3.13 on Linux x86_64 (manylinux), Windows x64
and macOS (Apple silicon), with the compiled kernel library and its BLAS
already inside them — no compiler, no BLAS install, no MATLAB or Octave.
Anything else falls back to the source distribution and compiles
locally, which does need a toolchain: see
docs/installation.rst.
Documentation
Full documentation (installation, the problem/solver API, and the
internals reference) is published at
napinoco.github.io/sedumipy
(built with Sphinx from docs/, auto-published to GitHub Pages
by .github/workflows/docs.yml on every
push to main). To build it locally instead:
pip install -r docs/requirements.txt
sphinx-build -b html docs docs/_build/html
Repository layout
The original MATLAB/Octave/MEX implementation this project ports from is kept as a reference-only git submodule, pinned to the commit the port started from:
sedumipy/
vendor/sedumi-upstream/ # submodule: sqlp/sedumi (reference only, not built by default)
examples/sdplib/ # submodule: vsdp/SDPLIB (published benchmark problems + optimal values)
examples/dimacs/ # submodule: vsdp/DIMACS (published benchmark problems + optimal values)
csrc/ # forked, MEX-free standalone C kernels (source for libsedumi.so)
src/sedumipy/ # the Python package
tests/ # test suite + committed Octave-generated oracle fixtures
tools/ # libsedumi build script + oracle/golden-reference generators
docs/ # Sphinx documentation source
Getting started from a checkout
To work on sedumipy itself (rather than just use it — see Installation above):
git clone --recurse-submodules <this-repo-url>
cd sedumipy
python -m venv .venv
.venv/bin/pip install -e .[test]
.venv/bin/python -m pytest tests/ -q
If you already cloned without --recurse-submodules, run
git submodule update --init --recursive first. Building libsedumi.so
(the compiled C kernel library) requires a C compiler (e.g. apt install build-essential on Debian/Ubuntu, or nothing extra at all on macOS —
Xcode's command line tools provide cc; on Windows, install
MSYS2 and its mingw-w64-x86_64-gcc package
first — see the Windows note in
docs/installation.rst or
CONTRIBUTING.md); it's then built automatically the
first time sedumipy is imported, via tools/build_libsedumi.sh. It
also needs a BLAS. On macOS this is always the system Accelerate
framework — nothing to install. On Linux/Windows, run pip install scipy-openblas64==0.3.34.106.0 (a pip-installable, prebuilt BLAS with
wheels for both — the same, version-pinned one the published wheels
themselves link, see pyproject.toml's [tool.cibuildwheel] comment
for why it's pinned) before pip install -e .[test] --no-build-isolation above, or skip that and it falls back to a system
BLAS per OS instead (e.g. apt install libopenblas-dev on Linux) — see
docs/installation.rst for the full story.
The Octave submodule is only needed to regenerate oracle/golden-
reference data, not to run the existing test suite.
Benchmarks
tests/test_benchmarks.py solves published SDPLIB
and DIMACS problems (added as git
submodules under examples/) and checks the result against each
collection's own official optimal-value table -- a correctness/regression
check against real reference numbers, not a synthetic self-check. It also
prints a timing/iteration-count summary and writes it to
benchmark_results.csv.
Coverage is essentially the full published set: all 92 SDPLIB problems and every DIMACS problem sedumi() can read directly, minus a documented handful this port can't yet solve in bounded time/memory or that hit a real solver limitation -- see the module's own docstring for the full exclusion list and why each one is excluded.
git submodule update --init --recursive # if not already done
.venv/bin/python -m pytest tests/test_benchmarks.py -v # everything, ~101 problems (~10 min)
.venv/bin/python -m pytest tests/test_benchmarks.py -v -m mini # fastest subset only (~35s)
Problems are grouped by pytest.mark.mini (<2s each) / timing (2-20s)
/ extended (20s-130s) by measured solve time -- see the module's own
docstring for the sign conventions each collection/family needs.
A note on citation and attribution
sedumipy is an independent, unofficial re-implementation of SeDuMi, created without involvement from the original SeDuMi authors or maintainers. Although it aims to reproduce SeDuMi's numerical behavior faithfully, it is a from-scratch port and may differ from the original in ways not yet identified — in short, it may not always behave identically to the original SeDuMi.
If you use this software in research, please cite the original SeDuMi paper to give credit where it is due:
Sturm, J.F. (1999). Using SeDuMi 1.02, a MATLAB toolbox for optimization over symmetric cones. Optimization Methods and Software, 11(1-4), 625-653.
At the same time, please make clear in your own work that results were produced using sedumipy, an unofficial Python port — not the original SeDuMi. Any discrepancy, bug, or unexpected numerical behavior you observe here is a property of this port, not of SeDuMi itself, and should not be attributed to the original project or its authors.
License
SeDuMi is licensed under the GNU General Public License v2 (see
LICENSE); this port, being a derivative work, is licensed
the same way.
Metadata
Release files for sedumipy 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sedumipy-0.0.1.tar.gz | 410.4 kB | With provenance | Details |
Built distributions (wheels)
Total release size: 62.5 MB
Release files / sedumipy-0.0.1.tar.gz
| Download URL | sedumipy-0.0.1.tar.gz |
|---|---|
| Size | 410.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b599bc24399eb94ae1844b78325ada3edfe2e0eb4254d41eaa84841bd13f3b1
|
|
BLAKE2b-256 checksum How to use checksums |
a23889526d08a2b942ea4002dfbd40c32a0b952282c8107af55a923e140cad6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp313-cp313-win_amd64.whl
| Download URL | sedumipy-0.0.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ae0632ce06d6b5776ba164f14a5ba850b56055710c40b97cb3666717f11e9248
|
|
BLAKE2b-256 checksum How to use checksums |
6c0597d4179571c539c103b294246c4c03404ae1637c1b29691a04c9dec68ef5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | sedumipy-0.0.1-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d38818b87530a0581f57ab71be32ef6d23134d5a60d25a15750b58f4d704d99f
|
|
BLAKE2b-256 checksum How to use checksums |
b8fb108c1cf921ff49f880d7943f7f1173467bc516a7de021aada52713c2a307
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | sedumipy-0.0.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 148.7 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
331f964665ef75e7037057687e4c58c76d1e00ae89dba995c6ecb3e245057bd5
|
|
BLAKE2b-256 checksum How to use checksums |
0c1284bcc74466fe2fae5944c6e4ec8727a8ea186645c1347cc90beebd5fc4d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp312-cp312-win_amd64.whl
| Download URL | sedumipy-0.0.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
247e3d0306b136445b74db3eb36c5531e9d2137dcc189d6660f3e80762466c93
|
|
BLAKE2b-256 checksum How to use checksums |
a5c005d90fd439bd493fb16e2b8036b1291a379ef1ec229e143d755dc565dd40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | sedumipy-0.0.1-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
8c22e3f931d244b5af1db6c726f9cba4691c49f041ed9d24130cd56c871cf1ff
|
|
BLAKE2b-256 checksum How to use checksums |
9c15b356cf79c498a60582cef7df58e356f9f7c314982a2bcb54ade153aff8ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | sedumipy-0.0.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 148.7 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8a0bb3907ced3ae3109aea588d7710790abc2dbb37513bcd3b0234e0f0643b35
|
|
BLAKE2b-256 checksum How to use checksums |
571b12e56307a2522f6798229c6e16f3634b83745fd60866f8d89f4a03667759
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp311-cp311-win_amd64.whl
| Download URL | sedumipy-0.0.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
debdd28dde97cdfe077168032ca0c1bad5a1983f57707ff407beea270c18aac3
|
|
BLAKE2b-256 checksum How to use checksums |
dadd9c9dec2643460b41491e9a7e22c2877c07221ead1045ab5bc6ae849031b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | sedumipy-0.0.1-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1f512b0b7048a881f0272a82b41917fb45069b3ca7d91ff076983fbeea341823
|
|
BLAKE2b-256 checksum How to use checksums |
1afc84274470366f814a2c554b928540ff71980cef7d4e1d107fd68b96cd241f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | sedumipy-0.0.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 148.7 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
94f768b596ac9d18018cf684949030f42714827d2f8413ef1e589d45ea96e78b
|
|
BLAKE2b-256 checksum How to use checksums |
75b8e00b45f48c71e9917cabfa0ab299a30643071e8150f94141c6bd738389bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp310-cp310-win_amd64.whl
| Download URL | sedumipy-0.0.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 6.7 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6a1f7ac1a6a5a862c5f1abf8de2c7e9bdc8caeeb459dc4bf12fa525f6f15d27d
|
|
BLAKE2b-256 checksum How to use checksums |
e176339229fa8a19f58d2513f47c13cba6f9d3d41a6250dddeecc343d2c7f4a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | sedumipy-0.0.1-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c0a24cd6990d06c5d3aeddfc73db06341639dfc4844983542799ad227811617a
|
|
BLAKE2b-256 checksum How to use checksums |
1c8cc14633383d4e5072d97083af7801b7b7ffc9628b293f8f506698b52446df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sedumipy-0.0.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | sedumipy-0.0.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 148.7 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
fc76a6987e92a59c55fcf993c2fb474e40512d476d5a945b2cc7d36d7aab1585
|
|
BLAKE2b-256 checksum How to use checksums |
fc08d184ac7f366badffb0f445786111cf7964b983c7a6880aa424c192ea7b2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logSecurity for sedumipy 0.0.1
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.
Full provenance
All 13 files in this release have been uploaded with provenance metadata.
Attestation for sedumipy-0.0.1.tar.gz
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 Sep 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.