{"id":16981275,"url":"https://github.com/technologicat/pylu","last_synced_at":"2026-04-28T17:02:00.717Z","repository":{"id":62581536,"uuid":"87544979","full_name":"Technologicat/pylu","owner":"Technologicat","description":"Small nogil-compatible linear equation system solver","archived":false,"fork":false,"pushed_at":"2026-04-11T09:24:07.000Z","size":196,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-11T11:23:32.944Z","etag":null,"topics":["cython","linear-equations","numerical","numpy","python","python2","python27","python3","python34","solver"],"latest_commit_sha":null,"homepage":"","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Technologicat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-04-07T12:47:33.000Z","updated_at":"2026-04-11T09:24:14.000Z","dependencies_parsed_at":"2022-11-03T21:34:20.398Z","dependency_job_id":null,"html_url":"https://github.com/Technologicat/pylu","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Technologicat/pylu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Technologicat%2Fpylu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Technologicat%2Fpylu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Technologicat%2Fpylu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Technologicat%2Fpylu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Technologicat","download_url":"https://codeload.github.com/Technologicat/pylu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Technologicat%2Fpylu/sbom","scorecard":{"id":138637,"data":{"date":"2025-08-04","repo":{"name":"github.com/Technologicat/pylu","commit":"33cf85dcb579eb0186e809562a599c124edd8f67"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: BSD 2-Clause \"Simplified\" License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T07:21:13.897Z","repository_id":62581536,"created_at":"2025-08-16T07:21:13.897Z","updated_at":"2025-08-16T07:21:13.897Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cython","linear-equations","numerical","numpy","python","python2","python27","python3","python34","solver"],"created_at":"2024-10-14T02:05:01.041Z","updated_at":"2026-04-28T17:02:00.712Z","avatar_url":"https://github.com/Technologicat.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyLU\n\n![top language](https://img.shields.io/github/languages/top/Technologicat/pylu)\n![supported Python versions](https://img.shields.io/pypi/pyversions/pylu)\n![supported implementations](https://img.shields.io/pypi/implementation/pylu)\n![CI status](https://img.shields.io/github/actions/workflow/status/Technologicat/pylu/ci.yml?branch=master)\n\n![version on PyPI](https://img.shields.io/pypi/v/pylu)\n![PyPI package format](https://img.shields.io/pypi/format/pylu)\n![dependency status](https://img.shields.io/librariesio/github/Technologicat/pylu)\n\n![license](https://img.shields.io/pypi/l/pylu)\n![open issues](https://img.shields.io/github/issues/Technologicat/pylu)\n[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](http://makeapullrequest.com/)\n\nSmall nogil-compatible Cython-based solver for linear equation systems `A x = b`.\n\nWe use [semantic versioning](https://semver.org/).\n\nFor my stance on AI contributions, see the [collaboration guidelines](https://github.com/Technologicat/substrate-independent/blob/main/collaboration.md).\n\n\n## Introduction\n\nThe algorithm is LU decomposition with partial pivoting (row swaps). The code requires only NumPy and Cython.\n\nThe main use case for PyLU (over `numpy.linalg.solve`) is solving many small systems inside a `nogil` block in Cython code, without requiring SciPy (for its `cython_lapack` module).\n\nPython and Cython interfaces are provided. The API is designed to be as simple to use as possible.\n\nThe arrays are stored using the C memory layout.\n\nA rudimentary banded solver is also provided, based on detecting the band structure (if any) from the initial full LU decomposition. For cases where `L` and `U` have small bandwidth, this makes the `O(n**2)` solve step run faster. The LU decomposition still costs `O(n**3)`, so this is useful only if the system is small, and the same matrix is needed for a large number of different RHS vectors. (This can be the case e.g. in integration of ODE systems with a constant-in-time mass matrix.)\n\n\n## Examples\n\nBasic usage:\n\n```python\nimport numpy as np\nimport pylu\n\nA = np.random.random( (5,5) )\nb = np.random.random( 5 )\n\nx = pylu.solve( A, b )\n```\n\nFor a complete tour, see the [test suite](tests/test_dgesv.py).\n\nThe main item of interest, however, is the Cython API in [`dgesv.pxd`](pylu/dgesv.pxd). The main differences to the Python API are:\n\n - Function names end with `_c`.\n - Explicit sizes must be provided, since the arrays are accessed via raw pointers.\n - The result array `x` must be allocated by the caller, and passed in as an argument. See [`dgesv.pyx`](pylu/dgesv.pyx) for examples on how to do this in NumPy.\n\n\n## Installation\n\n### From PyPI\n\n```bash\npip install pylu\n```\n\n### From source\n\n```bash\ngit clone https://github.com/Technologicat/pylu.git\ncd pylu\npip install .\n```\n\nFor maximum performance on your machine, build with architecture-specific optimizations:\n\n```bash\nCFLAGS=\"-march=native\" pip install --no-build-isolation .\n```\n\nPre-built wheels from PyPI use generic `-O2` because `-march=native` bakes in the instruction set of the build machine — a wheel built with AVX-512 would crash on a CPU without it. Building from source avoids this and lets the compiler target your specific hardware.\n\n### Development setup\n\nPyLU uses [meson-python](https://meson-python.readthedocs.io/) as its build backend and [PDM](https://pdm-project.org/) for dependency management.\n\n```bash\ngit clone https://github.com/Technologicat/pylu.git\ncd pylu\npdm install                              # creates venv, installs dev deps\npip install --no-build-isolation -e .    # editable install (needs venv activated)\n```\n\nThe `--no-build-isolation` flag is required for editable installs with meson-python — the on-import rebuild mechanism needs build dependencies (Cython, NumPy, meson, ninja) to remain available in the environment, not just in a throwaway build-time overlay.\n\n**PATH note:** The meson-python editable loader needs `meson` and `ninja` on `PATH`. If you get rebuild errors, ensure the venv's `bin/` is on the path:\n\n```bash\nexport PATH=\"$(pwd)/.venv/bin:$PATH\"\n```\n\n**Note on editable installs:** After modifying `.pyx` or `.pxd` files, the next import auto-rebuilds the Cython extension — no manual reinstall step needed. For a clean non-editable build, use `pip install .` and reinstall after changes.\n\n\n## Dependencies\n\n- [NumPy](http://www.numpy.org) ≥ 1.25\n- [Cython](http://www.cython.org) ≥ 3.0 (build-time only)\n\nRequires Python ≥ 3.11.\n\n\n## License\n\n[BSD](LICENSE.md). Copyright 2016–2026 Juha Jeronen, University of Jyväskylä, and JAMK University of Applied Sciences.\n\n\n#### Acknowledgement\n\nThis work was financially supported by the Jenny and Antti Wihuri Foundation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnologicat%2Fpylu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnologicat%2Fpylu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnologicat%2Fpylu/lists"}