{"id":15728223,"url":"https://github.com/basnijholt/mumpy","last_synced_at":"2025-10-19T01:34:14.510Z","repository":{"id":53264972,"uuid":"80726322","full_name":"basnijholt/mumpy","owner":"basnijholt","description":"Python bindings for the MUMPS package MUMPS: a parallel sparse direct solver","archived":false,"fork":false,"pushed_at":"2017-11-14T19:40:53.000Z","size":24,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-19T02:51:57.449Z","etag":null,"topics":["binding","linear-algebra","python","sparse-linear-systems"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basnijholt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-02T13:16:03.000Z","updated_at":"2024-01-14T12:32:37.000Z","dependencies_parsed_at":"2022-08-27T07:11:48.704Z","dependency_job_id":null,"html_url":"https://github.com/basnijholt/mumpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/basnijholt/mumpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basnijholt%2Fmumpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basnijholt%2Fmumpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basnijholt%2Fmumpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basnijholt%2Fmumpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basnijholt","download_url":"https://codeload.github.com/basnijholt/mumpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basnijholt%2Fmumpy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261070524,"owners_count":23105421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["binding","linear-algebra","python","sparse-linear-systems"],"created_at":"2024-10-03T23:01:32.687Z","updated_at":"2025-10-19T01:34:14.408Z","avatar_url":"https://github.com/basnijholt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mumpy\nPython bindings for the MUMPS package MUMPS: a parallel sparse direct solver\n\n# Installation\n## On Linux\nEither install `mumps` with:\n```\nsudo apt-get instal libmumps-scotch-dev\n```\n\n## Both on Linux and OSX\nor use the `conda` package on `conda-forge`\n```\nconda config --add channels conda-forge\nconda install cython mumps numpy scipy libgfortran\npip install git+git@github.com:basnijholt/mumpy.git\n```\nand use the following `build.conf` (if on Linux, not needed for OSX)\n\n```\n[mumps]\ninclude_dirs = $CONDA_PREFIX/include\nlibrary_dirs = $CONDA_PREFIX/lib\nlibraries = zmumps mumps_common pord metis esmumps scotch scotcherr mpiseq gfortran\nextra_link_args = -Wl,-rpath=$CONDA_PREFIX/lib\n```\n\n# Usage\n```python\nimport scipy.sparse.linalg as sla\nfrom scipy.sparse import identity\nimport mumpy.mumps as mumps\n\n\ndef sparse_diag(matrix, k, sigma, **kwargs):\n    \"\"\"Call sla.eigsh with mumps support.\n\n    Please see scipy.sparse.linalg.eigsh for documentation.\n    \n    Notes\n    -----\n    mumpy only works with complex numbers at the moment.\n    \"\"\"\n    class LuInv(sla.LinearOperator):\n        def __init__(self, A):\n            inst = mumps.MUMPSContext()\n            inst.analyze(A, ordering='pord')\n            inst.factor(A)\n            self.solve = inst.solve\n            sla.LinearOperator.__init__(self, A.dtype, A.shape)\n\n        def _matvec(self, x):\n            return self.solve(x.astype(self.dtype))\n\n    opinv = LuInv(matrix - sigma * identity(matrix.shape[0]))\n    return sla.eigsh(matrix, k, sigma=sigma, OPinv=opinv, **kwargs)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasnijholt%2Fmumpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasnijholt%2Fmumpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasnijholt%2Fmumpy/lists"}