Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

pycapacity-cpp

Latest version: v0.1.0

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
PyPI package Publisher: askuric
41 Stars
5 Forks
1 Versions
Python Repo language

Scan summary

pycapacity-cpp was last scanned on 30 Nov 2026 at version 0.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 30 Nov 2026.
  • Findings: No rules fired in version 0.1.0.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0 LATEST 30 Nov 2026 No rules fired

No rules fired in 0.1.0

Findings

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.

README

The publisher’s own README, as collected from the registry.

pycapacity-cpp

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.

Installation

conda (recommended)

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
pip

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
Releasing

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).

How the ICHM is made fast

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.

General projection: project_polytope

import 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).

Tests

python -m pytest cpp/tests              # C++ against Python, same polytopes
PYCAPACITY_BACKEND=cpp python -m pytest tests

Using the library from C++

include/pycapacity_cpp/polycap.hpp declares the functions (Eigen inputs and outputs); the CMake target polycap is a static library.

OX Radar and Response Center

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.

Where it’s listed

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).

  • pypi-releases pycapacity-cpp

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229