Scan your whole stack
Are you using pycapacity-cpp?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.0
pycapacity-cpp was last scanned on 30 Nov 2026 at version 0.1.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.0 LATEST | 30 Nov 2026 | No rules fired |
Findings for v0.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Compiled (C++) implementations of the polytope algorithms of pycapacity:
| algorithm | used for | speed-up over the Python code |
|---|---|---|
hyper_plane_shift_method (HPSM) |
velocity / acceleration / human force polytopes (H-rep) | 20-170x |
vertex_enumeration_vepoli2 |
robot force polytopes (V-rep) | 15-50x |
iterative_convex_hull_method (ICHM) |
human polytopes, any problem of the unified form | 10-90x |
halfspace_intersection (H -> V in 2D/3D) |
pycapacity.algorithms.hspace_to_vertex |
2-4x |
It also provides project_polytope(proj, ineq, eq=None, tol=None), a
general polytope projection {E x + f | A x <= b, C x = d} in any output
dimension with the same arguments and result as pypoman.project_polytope
(see below).
(Measured with primer/benchmarks/bench_cpp.py; the ranges depend on the
problem size, see the benchmark output.) On whole pycapacity calls: Franka
Panda velocity/acceleration/force polytopes 0.2/0.34/0.034 ms (Python 1.5-2
ms), 50-muscle human force polytope 1.3 ms at 10 N (Python 39 ms); see
docs/source/backend.rst.
When pycapacity-cpp is installed, pycapacity uses it automatically: the
functions of pycapacity.algorithms, and so every robot.* and human.*
polytope function, keep their inputs and outputs and run in C++. To select
the implementation:
import pycapacity.algorithms as algos
algos.get_backend() # 'cpp' or 'python'
algos.set_backend("python") # or "cpp", "auto" (default)
or set the environment variable PYCAPACITY_BACKEND=python before importing.
From the pycapacity folder:
conda env create -f cpp/environment.yml
conda activate pycapacity
This creates an environment with pycapacity, the compiled backend and their dependencies (all from conda-forge). In an existing conda environment:
conda install -c conda-forge cxx-compiler cmake ninja eigen qhull highs pybind11 scikit-build-core
pip install ./cpp
Once released on PyPI, prebuilt wheels (Linux x86_64/aarch64, macOS arm64/x86_64, Windows x64, Python 3.10-3.15) need no compiler:
pip install pycapacity[fast] # or: pip install pycapacity-cpp
From the sources, a C++17 compiler is needed (CMake comes from pip). Eigen, Qhull and HiGHS are downloaded and built during the build if they are not found:
pip install ./cpp
The wheels are built and tested by .github/workflows/cpp-wheels.yml
(cibuildwheel; every wheel runs cpp/tests against the Python
implementation). Pull requests touching cpp/ build them; a tag
cpp-vX.Y.Z matching the version in cpp/pyproject.toml also publishes
them to PyPI (trusted publishing, environment pypi).
Almost all the time of the ICHM goes into the linear programs, one per facet,
each solved for a new cost on the same constraints
y_min <= y <= y_max, E y = e, G y <= g, with very few rows. A general LP
solver spends ~150 us per call in setup even for 3 pivots (HiGHS, GLPK), so
pycapacity_cpp uses a small dense bounded-variable primal simplex that keeps
its basis between calls (the previous optimum stays feasible when only the
cost changes), flips all wrong-bound variables at once when possible, and
solves the facets in an order where consecutive normals are close. A typical
LP then takes 2-20 us. Every solution is checked and HiGHS solves it instead
if the check fails (info["n_lp_fallback"] counts these; it is 0 in all the
benchmarks and tests). lp_solver="highs" forces HiGHS for comparison.
project_polytopeimport pycapacity_cpp as pc
vertices = pc.project_polytope((E, f), (A, b), (C, d), tol=1e-6)
Inequality rows with a single nonzero become variable bounds (the box of
the ICHM); the others are general constraint rows. With up to 200 constraint
rows the LPs use the dense simplex; beyond that they go to HiGHS. The
polytope must be bounded (a ValueError is raised otherwise). The result is
an inner approximation within tol (default 1e-7 of the size; never
below 1e-8 of the size, the precision of the LP solutions).
python -m pytest cpp/tests # C++ against Python, same polytopes
PYCAPACITY_BACKEND=cpp python -m pytest tests
include/pycapacity_cpp/polycap.hpp declares the functions (Eigen inputs and
outputs); the CMake target polycap is a static library.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.